Commit Graph

879 Commits

Author SHA1 Message Date
John Choi
036fd4848b moved all my stuff to euler because it fits there better. Also, had to move my tests into a single euler test because it wouldn't work outside that one test. Maybe later I will create test_euler.h like how test_quat.h works 2023-12-09 00:38:38 -06:00
John Choi
666d692dfb fixed the bug with the tester. Its weird that the broken tester worked on my computer 2023-12-08 23:06:36 -06:00
John Choi
ec3796973e finished but trying to figure out why its not running in wasm 2023-12-08 14:15:49 -06:00
telephone001.mdl
45f2fff22f Merge branch 'recp:master' into master 2023-12-08 13:09:24 -06:00
John Choi
4ee6aea037 made quat struct and also exported it 2023-12-08 13:05:53 -06:00
John Choi
2f7dbad6a8 finally done with tests and all euler to quaternion functions 2023-12-08 12:19:09 -06:00
Valeri Ochinski
23d03ffe6c Fix struct clipspace headers
Add missing includes, fix signatures
2023-12-08 10:14:43 +03:00
John Choi
c5694c5c17 made all the functions. I have miscalculated some stuff and am currently trying to test them. I have created all the testing functions as well 2023-12-08 00:26:33 -06:00
John Choi
d67ac97323 got the euler to quat xyz working and got the tests to pass 2023-12-07 12:21:55 -06:00
John Choi
05ea35ffec made euler to quat xyz. Now I'm trying to test if it works or not 2023-12-07 10:29:07 -06:00
duarm
c431bbf190 fix procedure comment on transform 2023-12-06 16:54:46 -03:00
duarm
340292c0fb fix transform 2023-12-06 16:52:55 -03:00
duarm
2106f9ebcb remove _aabb2d_frustum 2023-12-06 16:48:48 -03:00
duarm
c1d78d835b changing from mat4 to mat3 2023-12-06 16:34:18 -03:00
duarm
44d103fa00 typos 2023-12-03 02:36:04 -03:00
duarm
c29f077bed Merge branch 'master' into aabb2d 2023-12-02 21:02:20 -03:00
duarm
2a975a7d0a circle fix, new copy func 2023-12-02 21:00:21 -03:00
myfreeer
009405adcd wasm: prefer pmin/pmax
According to [emscripten](https://emscripten.org/docs/porting/simd.html) and [v8](b6520eda5e/src/compiler/backend/x64/code-generator-x64.cc (L2661-L2699)), `[f32x4|f64x2].[min|max]` compiles to much more instructions than `[f32x4|f64x2].[pmin|pmax]`.
It is defined in [spec](https://github.com/WebAssembly/spec/blob/main/proposals/simd/SIMD.md#floating-point-min-and-max) that the difference between pmin/pmax and min/max is NaN-propagating behavior, and the equivalent to the x86 `_mm_min_ps`/`_mm_max_ps` is pmin/pmax in [v8](b6520eda5e/src/compiler/backend/x64/code-generator-x64.cc (L2740-L2747)).
This should make functions with min/max faster on webassembly, and align with the existing behavior with x86 sse.
2023-12-02 09:54:49 +08:00
Recep Aslantas
1fdc1c8675 struct: remove _vec_inv from struct function lists 2023-12-01 11:18:48 +03:00
Valeri
45cf4710c4 Use the appropriate version of alignof 2023-12-01 04:19:47 +03:00
duarm
056b28e4da Merge branch 'master' into aabb2d 2023-11-19 10:00:00 -03:00
Recep Aslantas
c6e58bd44a Update vec4-ext.h 2023-11-16 13:06:51 +03:00
havrik
ab684b7c66 Fix definition logic misspell in 'glm_quat_normalize_to' -> cglm/quat.h 2023-11-16 11:38:47 +03:00
duarm
53bde05bd9 aabb2d functions 2023-11-11 08:13:28 -03:00
duarm
9efc255451 struct api 2023-10-14 14:24:25 -03:00
duarm
9484155c98 adding vec2_center 2023-10-11 16:51:14 -03:00
Recep Aslantas
509078817c fix glm_ivec2|3_fill and glm_ivec2|3_eq params continue 2023-09-05 20:41:55 +03:00
Recep Aslantas
126f809dae fix glm_ivec2|3_fill and glm_ivec2|3_eq params 2023-09-05 20:19:33 +03:00
duarm
9d0c9fdb87 adding ivec2, ivec3, ivec4 prints, eqv, eq and fill, documentation fixes 2023-09-04 20:07:37 -03:00
LAPTOP-GHFRJ92J\John
54632ecce5 mat4_ins3 should copy mat3s to upper left mat4s. Previously, it just made a new mat4s r and put the mat3 into that and returned it. Now it takes in a mat4s and copies the mat3s to that. 2023-08-29 02:13:24 -05:00
Recep Aslantas
61478d2563 now working on v0.9.2 2023-08-10 09:20:39 +03:00
Recep Aslantas
54dfc4b4f0 Merge branch 'master' into non-square-matrix 2023-08-07 15:37:44 +03: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 <vince@underview.tech>
2023-08-06 14:12:24 -04:00
Andrei Alexeyev
2724620d83 more robust __builtin_assume_aligned detection
__builtin_assume_aligned is available since GCC 4.7, but __has_builtin
was added much later. Check for the GCC version if __has_builtin is not
available.

Users can also define CGLM_HAVE_BUILTIN_ASSUME_ALIGNED to either 1 or 0
to explicitly enable/disable the use of __builtin_assume_aligned. Meson
will do it automatically (by performing a configure-time test).
2023-07-31 22:33:51 +02:00
Recep Aslantas
4d5653b1f6 add some missing non-square matrix funcs in struct api 2023-07-22 14:17:26 +03:00
Recep Aslantas
dbb85f24c8 add some missing non-square matrix funcs 2023-07-22 13:37:36 +03:00
Recep Aslantas
6e9e91be05 add _mul for non-square matrices 2023-07-22 12:00:23 +03:00
Recep Aslantas
1e077fd125 add some missing non-square matrix funcs 2023-07-22 01:21:14 +03:00
Recep Aslantas
cb4a1b2677 Merge pull request #338 from EasyIP2023/feature/mat4x3
add new matrix mat4x3
2023-07-18 09:09:00 +03: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 <vince@underview.tech>
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 <vince@underview.tech>
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 <vince@underview.tech>
2023-07-16 20:19:25 -04:00
Recep Aslantas
ef8954ccbc Merge branch 'master' into feature/mat3x4 2023-07-16 23:31:33 +03:00
Vincent Davis Jr
82892085b3 docs: fix mat#x# comments and documentation
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
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 <vince@underview.tech>
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 <vince@underview.tech>
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 <vince@underview.tech>
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 <vince@underview.tech>
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 <vince@underview.tech>
2023-07-14 18:57:45 -04:00
Recep Aslantas
93cdc897a5 suppress warinngs 2023-07-08 23:13:20 +03:00