mirror of
https://github.com/recp/cglm.git
synced 2025-12-24 12:32:40 +00:00
add notes for versor/quaternion type to describe memory layout
This commit is contained in:
@@ -36,10 +36,15 @@ typedef float vec2[2];
|
||||
typedef float vec3[3];
|
||||
typedef int ivec3[3];
|
||||
typedef CGLM_ALIGN_IF(16) float vec4[4];
|
||||
typedef vec4 versor;
|
||||
typedef vec4 versor; /* |x, y, z, w| -> w is the last */
|
||||
typedef vec3 mat3[3];
|
||||
typedef CGLM_ALIGN_MAT vec4 mat4[4];
|
||||
|
||||
/*
|
||||
Important: cglm stores quaternion as [x, y, z, w] in memory since v0.4.0
|
||||
it was [w, x, y, z] before v0.4.0 ( v0.3.5 and earlier ). w is real part.
|
||||
*/
|
||||
|
||||
#define GLM_E 2.71828182845904523536028747135266250 /* e */
|
||||
#define GLM_LOG2E 1.44269504088896340735992468100189214 /* log2(e) */
|
||||
#define GLM_LOG10E 0.434294481903251827651128918916605082 /* log10(e) */
|
||||
|
||||
Reference in New Issue
Block a user