From 82892085b33678b7645453edaadadc52364c9ef2 Mon Sep 17 00:00:00 2001 From: Vincent Davis Jr Date: Sun, 16 Jul 2023 15:31:38 -0400 Subject: [PATCH] docs: fix mat#x# comments and documentation Signed-off-by: Vincent Davis Jr --- docs/source/mat2.rst | 2 +- docs/source/mat2x3.rst | 2 +- docs/source/mat2x4.rst | 2 +- docs/source/mat3.rst | 2 +- docs/source/mat3x2.rst | 2 +- docs/source/mat4.rst | 2 +- include/cglm/struct/mat2.h | 6 +++--- include/cglm/struct/mat2x3.h | 2 +- include/cglm/struct/mat2x4.h | 2 +- include/cglm/struct/mat3.h | 2 +- include/cglm/struct/mat4.h | 2 +- include/cglm/types-struct.h | 6 +++--- include/cglm/types.h | 6 +++--- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/source/mat2.rst b/docs/source/mat2.rst index 73c5951..119049d 100644 --- a/docs/source/mat2.rst +++ b/docs/source/mat2.rst @@ -183,7 +183,7 @@ Functions documentation Create mat2 matrix from pointer - | NOTE: **@src** must contain 4 elements. + | NOTE: **@src** must contain at least 4 elements. Parameters: | *[in]* **src** pointer to an array of floats diff --git a/docs/source/mat2x3.rst b/docs/source/mat2x3.rst index e961a8a..6f7f8bb 100644 --- a/docs/source/mat2x3.rst +++ b/docs/source/mat2x3.rst @@ -11,7 +11,7 @@ Table of contents (click to go): Macros: 1. GLM_MAT2X3_ZERO_INIT -#. GLM_MAT2x3_ZERO +#. GLM_MAT2X3_ZERO Functions: diff --git a/docs/source/mat2x4.rst b/docs/source/mat2x4.rst index 1c30d0e..499bc95 100644 --- a/docs/source/mat2x4.rst +++ b/docs/source/mat2x4.rst @@ -11,7 +11,7 @@ Table of contents (click to go): Macros: 1. GLM_MAT2X4_ZERO_INIT -#. GLM_MAT2x4_ZERO +#. GLM_MAT2X4_ZERO Functions: diff --git a/docs/source/mat3.rst b/docs/source/mat3.rst index ec45dd5..58863a2 100644 --- a/docs/source/mat3.rst +++ b/docs/source/mat3.rst @@ -193,7 +193,7 @@ Functions documentation Create mat3 matrix from pointer - | NOTE: **@src** must contain 9 elements. + | NOTE: **@src** must contain at least 9 elements. Parameters: | *[in]* **src** pointer to an array of floats diff --git a/docs/source/mat3x2.rst b/docs/source/mat3x2.rst index e86bfc0..d896431 100644 --- a/docs/source/mat3x2.rst +++ b/docs/source/mat3x2.rst @@ -11,7 +11,7 @@ Table of contents (click to go): Macros: 1. GLM_MAT3X2_ZERO_INIT -#. GLM_MAT3x2_ZERO +#. GLM_MAT3X2_ZERO Functions: diff --git a/docs/source/mat4.rst b/docs/source/mat4.rst index 31817a4..6fb8a38 100644 --- a/docs/source/mat4.rst +++ b/docs/source/mat4.rst @@ -308,7 +308,7 @@ Functions documentation Create mat4 matrix from pointer - | NOTE: **@src** must contain 16 elements. + | NOTE: **@src** must contain at least 16 elements. Parameters: | *[in]* **src** pointer to an array of floats diff --git a/include/cglm/struct/mat2.h b/include/cglm/struct/mat2.h index 0c481fc..d1692a5 100644 --- a/include/cglm/struct/mat2.h +++ b/include/cglm/struct/mat2.h @@ -27,7 +27,7 @@ CGLM_INLINE void glms_mat2_swap_col(mat2 mat, int col1, int col2) CGLM_INLINE void glms_mat2_swap_row(mat2 mat, int row1, int row2) CGLM_INLINE float glms_mat2_rmc(vec2 r, mat2 m, vec2 c) - CGLM_INLINE float glms_mat42_make(float * __restrict src); + CGLM_INLINE mat2s glms_mat2_make(float * __restrict src); */ #ifndef cglms_mat2_h @@ -44,8 +44,8 @@ #define GLMS_MAT2_ZERO_INIT {GLM_MAT2_ZERO_INIT} /* for C only */ -#define GLMS_MAT2_IDENTITY ((mat3s)GLMS_MAT2_IDENTITY_INIT) -#define GLMS_MAT2_ZERO ((mat3s)GLMS_MAT2_ZERO_INIT) +#define GLMS_MAT2_IDENTITY ((mat2s)GLMS_MAT2_IDENTITY_INIT) +#define GLMS_MAT2_ZERO ((mat2s)GLMS_MAT2_ZERO_INIT) /*! * @brief make given matrix identity. It is identical with below, diff --git a/include/cglm/struct/mat2x3.h b/include/cglm/struct/mat2x3.h index 659f7cc..483aea0 100644 --- a/include/cglm/struct/mat2x3.h +++ b/include/cglm/struct/mat2x3.h @@ -11,7 +11,7 @@ GLMS_MAT2X3_ZERO Functions: - CGLM_INLINE float glms_mat2x3_make(float * __restrict src); + CGLM_INLINE mat2x3s glms_mat2x3_make(float * __restrict src); */ #ifndef cglms_mat2x3_h diff --git a/include/cglm/struct/mat2x4.h b/include/cglm/struct/mat2x4.h index 81cf5da..be76854 100644 --- a/include/cglm/struct/mat2x4.h +++ b/include/cglm/struct/mat2x4.h @@ -11,7 +11,7 @@ GLMS_MAT2X4_ZERO Functions: - CGLM_INLINE float glms_mat2x4_make(float * __restrict src); + CGLM_INLINE mat2x4s glms_mat2x4_make(float * __restrict src); */ #ifndef cglms_mat2x4_h diff --git a/include/cglm/struct/mat3.h b/include/cglm/struct/mat3.h index a1b2922..6497acd 100644 --- a/include/cglm/struct/mat3.h +++ b/include/cglm/struct/mat3.h @@ -28,7 +28,7 @@ CGLM_INLINE mat3s glms_mat3_swap_col(mat3s mat, int col1, int col2); CGLM_INLINE mat3s glms_mat3_swap_row(mat3s mat, int row1, int row2); CGLM_INLINE float glms_mat3_rmc(vec3s r, mat3s m, vec3s c); - CGLM_INLINE float glms_mat3_make(float * __restrict src); + CGLM_INLINE mat3s glms_mat3_make(float * __restrict src); */ #ifndef cglms_mat3s_h diff --git a/include/cglm/struct/mat4.h b/include/cglm/struct/mat4.h index 4c3250f..346751b 100644 --- a/include/cglm/struct/mat4.h +++ b/include/cglm/struct/mat4.h @@ -42,7 +42,7 @@ CGLM_INLINE mat4s glms_mat4_swap_col(mat4s mat, int col1, int col2); CGLM_INLINE mat4s glms_mat4_swap_row(mat4s mat, int row1, int row2); CGLM_INLINE float glms_mat4_rmc(vec4s r, mat4s m, vec4s c); - CGLM_INLINE float glms_mat4_make(float * __restrict src); + CGLM_INLINE mat4s glms_mat4_make(float * __restrict src); */ #ifndef cglms_mat4s_h diff --git a/include/cglm/types-struct.h b/include/cglm/types-struct.h index 285ebac..5fbe552 100644 --- a/include/cglm/types-struct.h +++ b/include/cglm/types-struct.h @@ -199,7 +199,7 @@ typedef union mat2s { typedef union mat2x3s { mat2x3 raw; - vec3s col[2]; /* col -> row | [row (2), col (3)] */ + vec3s col[2]; /* [col (2), row (3)] */ #if CGLM_USE_ANONYMOUS_STRUCT struct { float m00, m01, m02; @@ -210,7 +210,7 @@ typedef union mat2x3s { typedef union mat2x4s { mat2x4 raw; - vec4s col[2]; /* col -> row | [row (2), col (4)] */ + vec4s col[2]; /* [col (2), row (4)] */ #if CGLM_USE_ANONYMOUS_STRUCT struct { float m00, m01, m02, m03; @@ -233,7 +233,7 @@ typedef union mat3s { typedef union mat3x2s { mat3x2 raw; - vec2s col[3]; /* col -> row | [row (3), col (2)] */ + vec2s col[3]; /* [col (3), row (2)] */ #if CGLM_USE_ANONYMOUS_STRUCT struct { float m00, m01; diff --git a/include/cglm/types.h b/include/cglm/types.h index 602b5a2..2eecf67 100644 --- a/include/cglm/types.h +++ b/include/cglm/types.h @@ -55,10 +55,10 @@ typedef float vec3[3]; typedef CGLM_ALIGN_IF(16) float vec4[4]; typedef vec4 versor; /* |x, y, z, w| -> w is the last */ typedef vec3 mat3[3]; -typedef vec2 mat3x2[3]; /* [row (3), col (2)] */ +typedef vec2 mat3x2[3]; /* [col (3), row (2)] */ typedef CGLM_ALIGN_IF(16) vec2 mat2[2]; -typedef vec3 mat2x3[2]; /* [row (2), col (3)] */ -typedef vec4 mat2x4[2]; /* [row (2), col (4)] */ +typedef vec3 mat2x3[2]; /* [col (2), row (3)] */ +typedef vec4 mat2x4[2]; /* [col (2), row (4)] */ typedef CGLM_ALIGN_MAT vec4 mat4[4]; /*