mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-05 13:49:17 -05:00
Review raylib structs comments
This commit is contained in:
42
src/raylib.h
42
src/raylib.h
@ -181,23 +181,23 @@
|
|||||||
|
|
||||||
// Vector2 type
|
// Vector2 type
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x; // Vector x component
|
||||||
float y;
|
float y; // Vector y component
|
||||||
} Vector2;
|
} Vector2;
|
||||||
|
|
||||||
// Vector3 type
|
// Vector3 type
|
||||||
typedef struct Vector3 {
|
typedef struct Vector3 {
|
||||||
float x;
|
float x; // Vector x component
|
||||||
float y;
|
float y; // Vector y component
|
||||||
float z;
|
float z; // Vector z component
|
||||||
} Vector3;
|
} Vector3;
|
||||||
|
|
||||||
// Vector4 type
|
// Vector4 type
|
||||||
typedef struct Vector4 {
|
typedef struct Vector4 {
|
||||||
float x;
|
float x; // Vector x component
|
||||||
float y;
|
float y; // Vector y component
|
||||||
float z;
|
float z; // Vector z component
|
||||||
float w;
|
float w; // Vector w component
|
||||||
} Vector4;
|
} Vector4;
|
||||||
|
|
||||||
// Quaternion type, same as Vector4
|
// Quaternion type, same as Vector4
|
||||||
@ -205,26 +205,26 @@ typedef Vector4 Quaternion;
|
|||||||
|
|
||||||
// Matrix type (OpenGL style 4x4 - right handed, column major)
|
// Matrix type (OpenGL style 4x4 - right handed, column major)
|
||||||
typedef struct Matrix {
|
typedef struct Matrix {
|
||||||
float m0, m4, m8, m12;
|
float m0, m4, m8, m12; // Matrix first row (4 components)
|
||||||
float m1, m5, m9, m13;
|
float m1, m5, m9, m13; // Matrix second row (4 components)
|
||||||
float m2, m6, m10, m14;
|
float m2, m6, m10, m14; // Matrix third row (4 components)
|
||||||
float m3, m7, m11, m15;
|
float m3, m7, m11, m15; // Matrix fourth row (4 components)
|
||||||
} Matrix;
|
} Matrix;
|
||||||
|
|
||||||
// Color type, RGBA (32bit)
|
// Color type, RGBA (32bit)
|
||||||
typedef struct Color {
|
typedef struct Color {
|
||||||
unsigned char r;
|
unsigned char r; // Color red value
|
||||||
unsigned char g;
|
unsigned char g; // Color green value
|
||||||
unsigned char b;
|
unsigned char b; // Color blue value
|
||||||
unsigned char a;
|
unsigned char a; // Color alpha value
|
||||||
} Color;
|
} Color;
|
||||||
|
|
||||||
// Rectangle type
|
// Rectangle type
|
||||||
typedef struct Rectangle {
|
typedef struct Rectangle {
|
||||||
float x;
|
float x; // Rectangle top-left corner position x
|
||||||
float y;
|
float y; // Rectangle top-left corner position y
|
||||||
float width;
|
float width; // Rectangle width
|
||||||
float height;
|
float height; // Rectangle height
|
||||||
} Rectangle;
|
} Rectangle;
|
||||||
|
|
||||||
// Image type, bpp always RGBA (32bit)
|
// Image type, bpp always RGBA (32bit)
|
||||||
|
|||||||
Reference in New Issue
Block a user