struct: quaternion api as structs

This commit is contained in:
Recep Aslantas
2019-06-03 12:12:50 +03:00
parent b9de553f23
commit 290f54bad4
4 changed files with 531 additions and 7 deletions

View File

@@ -44,7 +44,22 @@ typedef union CGLM_ALIGN_IF(16) vec4s {
vec4 raw;
} vec4s;
typedef vec4s versors;
typedef union CGLM_ALIGN_IF(16) versors {
#ifndef CGLM_NO_ANONYMOUS_STRUCT
struct {
float x;
float y;
float z;
float w;
};
struct {
vec3s imag;
float real;
};
#endif
vec4 raw;
} versors;
typedef union mat3s {
#ifndef CGLM_NO_ANONYMOUS_STRUCT