Commit Graph

566 Commits

Author SHA1 Message Date
Uwila
c67f7a14a1 Add ray-triangle intersection check 2020-04-02 14:28:28 +02:00
Recep Aslantas
686deb8eb1 util: use glm_clamp_zo to clamp between 0 and 1 2020-03-19 12:37:52 +03:00
Recep Aslantas
fabc655919 Merge branch 'master' of https://github.com/recp/cglm 2020-03-06 23:33:30 +03:00
Recep Aslantas
7eada03909 reemove redundant forward declerations 2020-03-06 23:33:27 +03:00
Zollerboy1
ad4a763d47 fix glms_vec2_rotate() by using a dest vec2s instead of taking an axis vector (#122) 2020-03-04 17:05:32 +03:00
Zollerboy1
1f9765c5e5 fix glms_sphere_transform by using mat4s instead of mat4 (#121)
Co-authored-by: Recep Aslantas <m@recp.me>
2020-03-04 11:56:40 +03:00
Recep Aslantas
b3a464bf89 now working on v0.7.2 2020-03-04 11:51:05 +03:00
Recep Aslantas
00523f0b89 helper to swap two float values 2020-03-01 12:56:11 +03:00
Recep Aslantas
31f313caff now working on v0.7.1 2020-02-29 14:00:50 +03:00
Recep Aslantas
010b88ee7a set version to v0.7.0 for vec2/mat2 release 2020-02-25 22:13:25 +03:00
Recep Aslantas
eb0d47cfa1 vec2: add struct version for vec2 and vec2-ext 2020-02-25 14:34:11 +03:00
Recep Aslantas
638b9f6dbe fix 'function declaration isn’t a prototype' 2020-02-24 23:11:03 +03:00
Recep Aslantas
701a95583a vec2: fix memory access error[s] 2020-02-24 22:21:43 +03: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
8a068c3291 Merge branch 'master' into vec2_mat2 2020-02-23 13:10:36 +03:00
Recep Aslantas
8ac1347f8a remove unused params from docs 2020-02-21 12:55:52 +03:00
Recep Aslantas
2278eba93c quat: fix quat_for and quat_forp implementations 2020-02-20 23:37:35 +03:00
Recep Aslantas
5ee9bb88df add notes for versor/quaternion type to describe memory layout 2020-02-20 17:29:32 +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
406d09e085 make plane zero if norm is zero after normalization 2020-01-19 21:48:55 +03:00
Recep Aslantas
65de029acb now working on v0.6.3 2020-01-19 20:37:49 +03:00
Recep Aslantas
f8784ffe8a win: enable anonymous structs for Visual Studio 2015 and later 2020-01-17 23:55:35 +03:00
Recep Aslantas
9af0ebd142 win: fix glms_quat_imagn if use struct option is disabled 2020-01-17 23:27:20 +03:00
Recep Aslantas
82a195f26a now owrkin on v0.6.2 2020-01-17 23:26:40 +03:00
Recep Aslantas
af7f8a5436 vec4: fix parameter name for NEON 2020-01-15 09:56:54 +03:00
Recep Aslantas
c3b5bb869a arm: fix type castings for ARM Neon 2020-01-15 09:56:19 +03:00
Jay Dolan
0330be853c Fix spelling error in name of glms_rotate_x. 2020-01-05 14:20:06 -05:00
Carsten Hartenfels
d89c01b39f Intuit if we should use anonymous structs
Rather than making the user #define something explicitly, we can guess
based on the compiler type and C standard.
2019-11-24 16:02:12 -05:00
Carsten Hartenfels
8ad273475f Make GLMS_ initializers use the GLM_ versions
So that we don't write them twice. More consistent this way.
2019-11-24 16:02:03 -05:00
Carsten Hartenfels
c8211b3a62 Re-order struct type contents array-first
So that initializers will prefer the array entry, rather than trying to
initialize the anonymous struct.
2019-11-24 16:01:55 -05:00
Carsten Hartenfels
11dae5126b Add braces around matrix struct intializers
They're missing and trigger warnings in the tests.
2019-11-24 13:32:35 -05:00
Carsten Hartenfels
4b9b7aeb20 Add a vec2s struct type for consistency
There's a vec2 type, so there should probably be a struct version of it
too. Even if no functions use it right now, if a library user (like me)
needs a 2-element vector, they don't need to roll their own.
2019-11-23 14:37:48 -05:00
Carsten Hartenfels
f3ea5b4f3e Change empty prototypes to (void)
Because () means an arbitrary number of arguments in C, which is not
intended here.
2019-11-23 10:10:17 -05:00
Recep Aslantas
c253769fcd Update applesimd.h 2019-11-07 22:43:47 +03:00
Recep Aslantas
2336256808 Helpers for apple's simd library (#107)
* helper to convert cglm matrix to Apple's simd type
2019-11-07 22:32:15 +03:00
Recep Aslantas
381e66349a win,test: fix test build for windows and suppress warnings 2019-10-14 19:08:34 +03:00
Recep Aslantas
7c10840a85 tests: add more tests for vec3 2019-09-23 22:39:53 +03:00
Recep Aslantas
79087a9813 mat4: add zero for call 2019-09-18 23:33:10 +03:00
Recep Aslantas
0377b99f80 mat4: add zero for call 2019-09-18 17:07:15 +03:00
Recep Aslantas
39dc61af54 tests: add a few test for mat4 2019-09-15 19:33:41 +03:00
Recep Aslantas
176cc28510 now working on v0.6.1 2019-09-12 07:11:49 +03:00
Recep Aslantas
b46a4ccee5 Merge branch 'vec2_mat2' of https://github.com/recp/cglm into vec2_mat2 2019-09-01 17:12:12 +03:00
Recep Aslantas
5da864f345 Merge branch 'master' into vec2_mat2 2019-09-01 17:10:28 +03:00
Luigi Castelli
27cc9c3351 vec: some useful functions (#103)
These functions are added:
- abs(): absolute value
- fract(): fractional part
- norm_one(): L1 norm
- norm_inf(): infinity norm
- hadd(): horizontal add
- hmax(): horizontal max
2019-09-01 00:30:15 +03:00
Recep Aslantas
3640e402da mat2 struct version 2019-08-31 14:36:57 +03:00
Recep Aslantas
d86f5df776 vec: call version for vec2 2019-08-30 22:56:20 +03:00
Recep Aslantas
cb54a8b8c5 vec2: rotate vec2 by angle 2019-08-30 22:00:20 +03:00
Recep Aslantas
8cb6fa792c Merge branch 'master' into vec2_mat2 2019-08-30 21:34:23 +03:00
Recep Aslantas
03fda193a5 vec: update docs for norm 2019-08-30 14:47:26 +03:00