Commit Graph
30 Commits
Author SHA1 Message Date
Vincent Davis Jr 088c66029d docs: mat3x2 account for latest mulitplication changes
This also includes tables to explain how
mat3x2, column vectors, and row vectors are
represented. Also includes how resulting
matrix or vector is formed.

Signed-off-by: Vincent Davis Jr <[email protected]>
2024-03-31 00:39:27 -04:00
Vincent Davis Jr 2283c708c6 mat3x2: fix multiplication functions
Signed-off-by: Vincent Davis Jr <[email protected]>
2024-03-31 00:23:39 -04:00
Vincent Davis Jr 047138321c docs: 2/2 fixes https://github.com/recp/cglm/issues/371
Second commit for fixing non-square matrix
multiplication docs.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-12-09 14:28:57 -05:00
Vincent Davis Jr da51741c50 test: add missing mat4x3 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:46 -04:00
Vincent Davis Jr a5d8e61c2b test: add missing mat4x2 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:26 -04:00
Vincent Davis Jr f0f7b67ef4 test: add missing mat3x4 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:26 -04:00
Vincent Davis Jr eece0b7bc9 test: add missing mat3x2 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:26 -04:00
Vincent Davis Jr 37d20f7da8 test: add missing mat2x4 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:26 -04:00
Vincent Davis Jr 006e4ffbdf test: add missing mat2x3 tests
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:26 -04:00
Vincent Davis Jr aa37c1aa74 fix array subscript is outside array bounds
warning: array subscript # is outside array bounds
of ‘float[#]’ [-Warray-bounds]

Commit also fixes variable order when calculating
multiplication between two matrices.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-06 14:12:24 -04:00
Vincent Davis Jr 0fb9e73ec1 docs: add missing non-square matrix funcs
Functions include:
	* glm_mat#x#_copy
	* glm_mat#x#_zero
	* glm_mat#x#_mul
	* glm_mat#x#_mulv
	* glm_mat#x#_transpose
	* glm_mat#x#_scale

Commit also includes some minor changes to
	* mat2
	* mat3
	* mat4

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-08-05 20:54:24 -04:00
Vincent Davis Jr e9df003e56 types-struct: fix mat4x2s struct members
union mat4x2s { struct {  } } contains
members with incorrect naming.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-17 23:09:40 -04:00
Vincent Davis Jr 3d292c3a2e add new matrix mat4x3
Initial function being

glm_mat4x3_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-17 22:57:52 -04:00
Vincent Davis Jr 2df26c0ecf add new matrix mat4x2
Initial function being

glm_mat4x2_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-16 20:19:25 -04:00
Vincent Davis Jr 82892085b3 docs: fix mat#x# comments and documentation
Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-16 15:46:35 -04:00
Vincent Davis Jr e09cf11f1c add new matrix mat3x4
Initial function being

glm_mat3x4_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-16 15:41:36 -04:00
Vincent Davis Jr 4e44e74d48 add new matrix mat3x2
Initial function being

glm_mat3x2_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-15 18:48:50 -04:00
Vincent Davis Jr dd6a0b3175 add missing mat2x# test and mat2x3 window headers
Missing tests where
	* MACRO_GLM_MAT2X3_ZERO_INIT
	* MACRO_GLM_MAT2X3_ZERO
	* mat2x3s_zero_init
	* mat2x3s_zero
	* mat2x4s_zero_init
	* mat2x4s_zero

Commit:
	* removes (mat2x3) from
	  ((mat2x3)GLM_MAT2X3_ZERO_INIT) to fix
	  error: array initialized from non-constant array expression
	* removes test_assert_mat2x3_eq_zero
	  from test/src/test_struct.c
	* adds TEST_IMPL(mat2x3s_zero) to
	  test/src/test_struct.c

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-15 16:16:03 -04:00
Vincent Davis Jr fe7471e8f8 add new matrix mat2x4
Initial function being

glm_mat2x4_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-15 14:32:48 -04:00
Vincent Davis Jr 6317ed90e7 add new matrix mat2x3
Initial function being

glm_mat2x3_make

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-14 18:57:45 -04:00
Vincent Davis Jr 5833d1bf44 vec4: add new function glm_vec4_make
Function takes in a float array. Array must be
at least of size 4 and converts it into
a 4D vector.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-02 13:54:10 -05:00
Vincent Davis Jr aeeeac4c5a vec3: add new function glm_vec3_make
Function takes in a float array. Array must be
at least of size 3 and converts it into
a 3D vector.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-02 13:25:25 -05:00
Vincent Davis Jr b3de85a14e vec2: add new function glm_vec2_make
Just a copy of glm_vec2, but with the
word _make suffixed at the end.

Function takes in a float array array must be
at least of size 2 and converts it into
a 2D vector.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-02 12:41:23 -05:00
Vincent Davis Jr 5e798a94e3 test_quat: add more robust quat_make test
Makes it so that it's easier to identify
the potential usecase of function. Commit also
includes a fix to the struct/quat.h glms_quat_make
comment. Should be returning versors it's not
a void function.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-07-02 12:37:28 -05:00
Vincent Davis Jr bfe5ea6ab7 quat: add new function glm_quat_make
Function takes in a 4 element float array
and converts it into a quaternion.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-06-28 22:49:49 -05:00
Vincent Davis Jr 2d6538ecec io: fix test runner.c implicit declaration glm_arch_print
Problem:

../test/runner.c:29:3: error: implicit declaration of function
‘glm_arch_print’ [-Werror=implicit-function-declaration]
   29 |   glm_arch_print(stderr);
      |   ^~~~~~~~~~~~~~
      |   glm_vec2_print

glm_arch_print is not available unless you add the DEBUG macro.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-05-15 11:30:13 -05:00
Vincent Davis Jr 0566a040c0 mat3: add new function glm_mat3_make
Function takes in a 9 element float array
and converts it into a mat3 matrix.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-05-14 20:56:25 -05:00
Vincent Davis Jr e6681e78c8 mat2: add new function glm_mat2_make
Function takes in a 4 element float array
and converts it into a mat2 matrix.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-05-14 20:30:36 -05:00
Vincent Davis Jr e17f115f91 mat4: add new function glm_mat4_make
Function takes in a 16 element float array
and converts it into a mat4 matrix.

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-05-14 20:10:48 -05:00
Vincent Davis Jr 2631d3b5ea README: update meson option for running test
Running on an already built build directory

meson configure -Denable_tests=true build/

Leads to

ERROR: Unknown options: "enable_tests"

Seems the meson option was updated

Signed-off-by: Vincent Davis Jr <[email protected]>
2023-05-14 19:38:58 -05:00