tayoky
3aad5823ca
add glm_vecx_swap functions
2025-11-15 10:39:14 +01:00
Recep Aslantas
a88d32c776
Merge branch 'master' into optimize-inv
2025-02-09 15:13:28 +03:00
Recep Aslantas
70a1a946ee
arm: use glmm_div where possible to fix ARMv7 <-> ARM64
2025-01-24 22:21:11 +03:00
Recep Aslantas
8ca1f19aa2
arm: use glmm_div where possible to fix ARMv7 <-> ARM64
2025-01-24 22:20:57 +03:00
Recep Aslantas
adb3ac18c0
Merge branch 'master' into optimize-inv
2025-01-24 16:04:49 +03:00
Marcin
b79347eb13
vdivq_f32
2025-01-22 16:49:26 +00:00
Marcin
6c0e3e9460
deprecate step_uni in favour of steps
...
This seems to be the newer naming system
2025-01-18 20:10:58 +00:00
Recep Aslantas
48839a38a1
fix refract
2024-07-15 12:41:23 +03:00
Recep Aslantas
45c1beff51
simd: fix glmm_set1, glmm_splat
2024-04-12 21:53:20 +03:00
Recep Aslantas
68bdec4510
simd: use glmm_set1() to optimize broadcasting single float
2024-04-10 22:52:53 +03:00
Recep Aslantas
f388df7f3e
fix typos
2024-03-31 04:40:42 +03:00
Recep Aslantas
4c872238d9
dont use I macro defined in standard
2024-03-31 04:22:42 +03:00
Recep Aslantas
1de373a9bd
normalize: norm == 0.0f to norm < FLT_EPSILON, improving handling of very small vectors to prevent instability and overflow
2024-03-25 02:22:46 +03:00
Recep Aslantas
aad5223da0
change signature of refraction to let caller know if refraction occurs or not
2024-03-24 06:31:29 +03:00
Recep Aslantas
6ad0aca7e0
fix refract
2024-03-22 21:59:10 +03:00
Recep Aslantas
3701305c9e
suppress warnings
2024-03-22 10:36:28 +03:00
Recep Aslantas
2b78f9ab47
refract
2024-03-22 00:18:55 +03:00
Recep Aslantas
8c81443f24
reflect
2024-03-21 00:18:02 +03:00
Bruce Mitchener
182c28faf8
Allow passing const float* to make functions.
2024-03-18 19:49:50 +07:00
Bruce Mitchener
e4419c4f18
Fix typos.
2024-02-08 15:12:30 +07:00
Recep Aslantas
6d8dd42ac2
simd: use new glmm_min/max in vec4 where possible
2024-01-11 00:14:28 +03:00
BeeverFeever
4c4a69ddfe
Should be all
2023-12-11 01:08:10 +11:00
BeeverFeever
865faad116
Fix simd versions
2023-12-10 15:49:59 +11:00
BeeverFeever
39602ef4d7
Fix vec4 functions
2023-12-05 18:49:10 +11:00
BeeverFeever
7696374f1e
Vector subtraction functions
...
Add subtraction family of functions for vectors.
2023-12-04 21:32:19 +11:00
myfreeer
009405adcd
wasm: prefer pmin/pmax
...
According to [emscripten](https://emscripten.org/docs/porting/simd.html ) and [v8](https://github.com/v8/v8/blob/b6520eda5eafc3b007a5641b37136dfc9d92f63d/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](https://github.com/v8/v8/blob/b6520eda5eafc3b007a5641b37136dfc9d92f63d/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
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 <vince@underview.tech >
2023-07-02 13:54:10 -05:00
Wladislav ヴラド Artsimovich
87ae96b847
Fix Singular / Plural in comments
2023-06-16 17:40:06 +09:00
Recep Aslantas
391d8670c2
simd, sse: use 0x80000000 insteaf of -0.f to fix fastmath on msvc
2023-04-21 20:14:58 +03:00
myfreeer
81b7c90271
simd128: simplify calls
2023-04-15 22:06:04 +08:00
myfreeer
3a9e4df393
simd128: handle both sse2 and simd128 enabled by Emscripten
...
https://github.com/recp/cglm/pull/286#issuecomment-1492985403
2023-04-02 12:39:20 +08:00
myfreeer
51ce4db82e
simd128: code style
2023-04-01 19:38:28 +08:00
myfreeer
73adfe08c0
simd128: inline _mm_cvtss_f32
2023-04-01 19:34:19 +08:00
myfreeer
3aca10ecda
simd128: minor lint
2023-03-29 20:41:47 +08:00
myfreeer
03c7bee863
simd128: inline some functions
2023-03-26 19:34:07 +08:00
myfreeer
71c585b159
simd128: enable in headers
2023-03-26 19:34:07 +08:00
Recep Aslantas
d13842e7de
arm: optimize vec4 div with NEON
2021-04-24 00:51:09 +03:00
Recep Aslantas
f303984aad
use unified glmm api for vec4
2021-04-23 23:34:36 +03:00
Recep Aslantas
04008d9c3f
arm: fix fma for glm_vec4_muladds
2021-04-19 00:21:04 +03:00
Recep Aslantas
f3f29bd383
vec4: optimize muladd and muladds with fma
2021-04-18 16:24:29 +03:00
Recep Aslantas
f49e8f9991
neon: fix vec4_muladds (critical)
2020-05-26 23:03:32 +03:00
Recep Aslantas
269bdb3dbd
fix arm neon build
2020-05-11 20:19:05 +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
03fda193a5
vec: update docs for norm
2019-08-30 14:47:26 +03:00
Luigi Castelli
4639f3184a
glm_lerpc(), glm_step(), glm_smoothstep(), glm_smoothinterp() ( #98 )
...
* lerp, step, smoothstep
* glm_lerp() and friends are no longer clamped, use glm_lerpc() and friends
* mix() function as wrapper of lerp()
* no there are clamp and raw version of lerp functions
2019-08-25 22:17:36 +03:00
Luigi Castelli
43b36f1dc1
squared distance with SIMD support ( #96 )
...
squared distance for vec4
2019-08-23 10:32:54 +03:00
Recep Aslantas
f0be6eb448
Merge branch 'master' into swizzle
2019-06-06 12:58:55 +03:00
Recep Aslantas
bb8ff25752
Revert "mark readonly parameters as const"
2019-04-30 08:19:07 +03:00
Recep Aslantas
6ed275734b
mark readonly parameters as const
2019-04-28 12:15:43 +03:00
Wasin Thonkaew
461a4009ba
refactor vec4 : glm_vec4_distance for SSE/SSE2
...
According to suggestion by recp at
https://github.com/recp/cglm/issues/82#issuecomment-483051704 .
2019-04-19 02:07:57 +08:00