Commit Graph

62 Commits

Author SHA1 Message Date
Recep Aslantas
c1ff76d3b1 fix existing tests build 2023-04-21 22:15:04 +03:00
duarm
a0f01c5ed1 new abs functions for vec2, ivec2, ivec3, ivec4 2022-11-18 14:28:39 -03:00
Christopher Lang
d1bdfde48d Add ivec4 tests 2022-05-20 14:42:42 +01:00
Christopher Lang
bffaa13bd5 Add ivec3 tests 2022-05-19 17:12:38 +01:00
Christopher Lang
db1a23d13c Add ivec2 tests 2022-05-17 22:27:38 +01:00
Christopher Lang
d582146d9a Add ivec3 and ivec4 files 2022-05-17 16:04:47 +01:00
Christopher Lang
4c85b970a9 Add ivec2 files 2022-05-16 22:41:04 +01:00
Christopher Lang
495b98a54d Fix tests.h comments 2022-05-16 20:51:44 +01:00
Maxim Kasyanenko
522b18bda9 Add tests 2021-11-08 17:53:39 -08:00
Sundaram Ramaswamy
ee5050f43c Tests for quaternion from two vec3 2021-06-10 23:15:10 +05:30
michaelg
c013bd462c Add LH & RH_NO perspective functions
This commit adds functions `glm_perspective_lh_no` and
`glm_perspective_rh_no` to the code. Unit tests are added and this
commit follows the new pattern of adding the a new file per
coordinate-system and clip-space tuple.

. Makefile.am updated
. removed test/glm_cmp project stub
. unit tests include naive implementations to as well as magic number
  ref-data generated by the corresponding GLM functions.

No tests run yet on Windows or Mac.
2021-05-13 23:18:05 +02:00
michaelg
b3a18b8a15 Add glm_perspective_rh_zo function + tests
This commit adds the RH/ZO perspective function. It does so in the new
file `cam_rh_zo.h` and further refactors the LH variant into new file
`cam_lh_zo.h`. This creates some churn in the tests and configuration
files as new test files were added as well, and all these changes found
their way into the build files.

Tests passing on Linux.
2021-05-13 23:18:05 +02:00
michaelg
1bce62c371 Add function glm_perspective_lh_zo
This commit adds the function `glm_perspective_lh_zo`, modelled on the
implementation of glm_perspective, but amended to provide a left-hand
coordinate system expected by DirectX, Metal and Vulkan (per the GLM
project's `glm/detail/setup.hpp`). It uses a clip-space of zero-to-one.

The function is tested against a longhand version of the algorithm it
seeks to implement as well as against the output of the GLM project's
`glm::perspectiveLH_ZO` function. This commit adds a new subdirectory
`test/glm_cmp` which contains a basic CMake file and `main.cpp`. An
interested user should link or copy or clone the GLM project into this
directory. The `main` function can be used to print the reference data
used so others can verify behaviour in the future, or add new literal
reference values.
2021-05-13 23:18:05 +02:00
Sundaram Ramaswamy
83dbdcc4a9 Add nlerp tests 2021-05-07 01:21:28 +05:30
Recep Aslantas
2242e9a5e1 2d: add tests for rotate2d and its friends 2020-07-31 18:21:23 +03:00
Recep Aslantas
0127d30fa8 2d: add scale2d and its friends 2020-07-31 13:49:33 +03:00
Recep Aslantas
9b13b2f872 add tests for translate2d functions 2020-07-31 12:43:46 +03:00
Recep Aslantas
c0a4c245f0 tests: add test for frustum 2020-05-28 14:19:35 +03:00
Recep Aslantas
7e142132bf win: suppress warning; C4005: '_CRT_SECURE_NO_WARNINGS': macro redefinition 2020-05-17 19:24:48 +03:00
Uwila
90eb164a43 Add tests for cglm_ray_triangle 2020-04-06 11:42:23 +02:00
Uwila
78b2e2d2cc Add tests for glm_ray_triangle 2020-04-06 11:38:27 +02:00
Recep Aslantas
ad9370537c add tests for mat2 and its call version 2020-02-24 22:14:26 +03:00
Recep Aslantas
43ae3b332a add tests for vec2 and its call version 2020-02-24 10:06:19 +03:00
Recep Aslantas
7b0f62f1eb tests: add some tests for affine matrices 2020-02-22 10:54:47 +03:00
Recep Aslantas
0c8dc070d5 tests: tests for affine transforms (continue) 2020-02-22 10:29:16 +03:00
Recep Aslantas
0822d46cd9 tests: tests for remaining rotations 2020-02-22 00:58:04 +03:00
Recep Aslantas
5995269195 tests: add tests for some affine rotations 2020-02-21 17:52:50 +03:00
Recep Aslantas
6b32b5dc35 tests: add tests for affine scales 2020-02-21 16:57:09 +03:00
Recep Aslantas
81ae182972 tests: add tests for affine translations 2020-02-21 15:52:34 +03:00
Recep Aslantas
de85a4eb2b quat: add tests for quat_rotate_at[m] 2020-02-21 14:28:41 +03:00
Recep Aslantas
e7a0906bc2 quat: add tests for quat_rotate 2020-02-21 11:48:25 +03:00
Recep Aslantas
6aa8df8e9b quat: add tests for quat_rotatev 2020-02-21 10:51:53 +03:00
Recep Aslantas
2278eba93c quat: fix quat_for and quat_forp implementations 2020-02-20 23:37:35 +03:00
Recep Aslantas
349dc274f4 add forward vector as macro (vec3, RH)
* this will be used for where Vec3.Forward is needed
2020-02-20 15:19:20 +03:00
Recep Aslantas
b9f9548b06 test: test for plane 2020-01-19 22:15:19 +03:00
Recep Aslantas
c630293c7d merge test sources into one C source 2020-01-19 22:12:25 +03:00
Carsten Hartenfels
b9aa14d25e Add a test for struct type initializers
To make sure that they all work properly and none of them trigger
warnings.
2019-11-24 16:02:12 -05:00
Recep Aslantas
7cdeada701 tests: add test for glm_quat_look 2019-09-27 17:53:51 +03:00
Recep Aslantas
841257a208 tests: add test for quat_slerp 2019-09-26 19:57:00 +03:00
Recep Aslantas
ca9b8ceac3 tests: add some tests for quat 2019-09-25 14:03:58 +03:00
Recep Aslantas
5b0e161502 tests: add some tests for quat 2019-09-25 13:47:26 +03:00
Recep Aslantas
fb23d1998e tests: add more tests for quat 2019-09-25 12:43:01 +03:00
Recep Aslantas
b2084fbacf tests: add some tests for quat 2019-09-25 07:42:29 +03:00
Recep Aslantas
56cbacd9f6 tests: add missing test for vec4 2019-09-24 21:45:43 +03:00
Recep Aslantas
1700187f65 tests: add more tests for vec4 2019-09-24 19:10:44 +03:00
Recep Aslantas
36024367bc tests: add more tests for vec4 2019-09-24 17:02:47 +03:00
Recep Aslantas
ce09e543ef tests: add some tests for vec4 2019-09-24 16:33:42 +03:00
Recep Aslantas
7c10840a85 tests: add more tests for vec3 2019-09-23 22:39:53 +03:00
Recep Aslantas
37c2650b0a tests: add more tests for vec3 2019-09-23 12:03:06 +03:00
Recep Aslantas
3a48e4cd84 tests: add more tests for vec3 2019-09-22 23:32:57 +03:00