mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
extend unions for struct api
This commit is contained in:
@@ -47,6 +47,21 @@ typedef union vec2s {
|
|||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float r;
|
||||||
|
float i;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float u;
|
||||||
|
float v;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float s;
|
||||||
|
float t;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} vec2s;
|
} vec2s;
|
||||||
|
|
||||||
@@ -58,6 +73,12 @@ typedef union vec3s {
|
|||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float r;
|
||||||
|
float g;
|
||||||
|
float b;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} vec3s;
|
} vec3s;
|
||||||
|
|
||||||
@@ -68,6 +89,21 @@ typedef union ivec2s {
|
|||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int r;
|
||||||
|
int i;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int u;
|
||||||
|
int v;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int s;
|
||||||
|
int t;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} ivec2s;
|
} ivec2s;
|
||||||
|
|
||||||
@@ -79,6 +115,12 @@ typedef union ivec3s {
|
|||||||
int y;
|
int y;
|
||||||
int z;
|
int z;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int r;
|
||||||
|
int g;
|
||||||
|
int b;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} ivec3s;
|
} ivec3s;
|
||||||
|
|
||||||
@@ -91,6 +133,13 @@ typedef union ivec4s {
|
|||||||
int z;
|
int z;
|
||||||
int w;
|
int w;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int r;
|
||||||
|
int g;
|
||||||
|
int b;
|
||||||
|
int a;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} ivec4s;
|
} ivec4s;
|
||||||
|
|
||||||
@@ -103,6 +152,13 @@ typedef union CGLM_ALIGN_IF(16) vec4s {
|
|||||||
float z;
|
float z;
|
||||||
float w;
|
float w;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float r;
|
||||||
|
float g;
|
||||||
|
float b;
|
||||||
|
float a;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
} vec4s;
|
} vec4s;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user