prescientmoon
5a29e80bc3
Fix 2x2 matrix inverses in specific.odin
2025-01-23 05:56:27 +01:00
Sebastian Pahnke
f23e226854
Rename adjugate to cofactor to keep existing usages for inverse and determinant correct and add new adjugate procedures
2024-12-28 10:29:43 +01:00
gingerBill
61368d942e
Merge pull request #4589 from Pariatech/add-trunc-to-linalg-glsl
...
Add trunc to glsl linalg
2024-12-18 21:20:17 +00:00
Gabriel Pariat
e0b7bfd21e
add trunc to glsl linalg
2024-12-17 13:06:59 -05:00
Bazzagibbs
4b76568596
Add linalg.clamp_length(vector, max_length) -> clamped_vector
2024-12-02 11:58:36 +11:00
Dudejoe870
4d22f1f544
Fix typo in Quaternion dot product
2024-11-17 10:42:59 -06:00
gingerBill
e17dfcf7a2
Remove distinct from core:math/linalg/(glsl|hlsl) types
2024-09-18 00:13:34 +01:00
Jeroen van Rijn
24e6f16f4a
Clamp dot in angle_between to avoid precision errors.
...
Fixes #3978
2024-07-28 15:00:29 +02:00
Feoramund
2af121752a
Require base:runtime import in core:math/linalg
2024-06-28 11:34:35 -04:00
gingerBill
c1e81dc14d
Fix #3726
2024-06-10 15:05:24 +01:00
Feoramund
88598c2c64
Make use of runtime.Raw_* types in core:math/linalg
2024-06-03 15:58:33 -04:00
shashank
fb6248925a
fix pitch_from_quaternion
2024-05-27 23:38:50 +05:30
IllusionMan1212
1f5f417116
fix(linalg/glsl): incorrect quat by vector3 multiplication
2024-04-28 21:44:34 +02:00
gingerBill
398af659e5
Fix #3323
2024-03-24 13:33:30 +00:00
spindlebink
b2e7eb4db4
Properly initialize return matrices in linalg.orthonormalize
2024-03-09 09:10:25 -06:00
Lucas Perlind
6df07a2c0a
Remove bounds checking on a lot of linalg
2024-02-13 10:23:29 +11:00
Lucas Perlind
c0d407a2b4
Revert "Change minor/adjoint to be row, col from c, r to be consistent with [row, col] syntax; Add #no_bounds_check were appropriate"
...
This reverts commit 5dd2e38aff .
2024-02-13 10:13:34 +11:00
gingerBill
900fe95ba0
Split out linalg.identity between matrices and array-based matrix
2024-02-12 12:08:43 +00:00
gingerBill
5dd2e38aff
Change minor/adjoint to be row, col from c, r to be consistent with [row, col] syntax; Add #no_bounds_check were appropriate
2024-02-12 11:54:24 +00:00
gingerBill
b0675358c3
Add angle_between and matrix2_rotate
2024-02-06 14:09:05 +00:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
gingerBill
f67691c457
Move matrix related procedures to the different linalg packages
2024-01-28 21:28:54 +00:00
Lucas Perlind
67d5b97ff9
Fix linalg shadowing error
2024-01-09 10:24:12 +11:00
gingerBill
b408ec6bac
Remove distinct from the specific types
2024-01-05 14:48:39 +00:00
gingerBill
0b83e3dae5
Enforce naming the parameters with builtin.quaternion to reduce confusion
2024-01-05 14:29:14 +00:00
gingerBill
396debb9cb
Add @(require_results) to core:math/linalg's glsl and hlsl packages
2023-05-22 12:11:18 +01:00
gingerBill
c4cb2f2378
Add "contextless" to core:math/linalg procedures
2023-05-22 12:07:37 +01:00
gingerBill
74ce99e0d7
Add @(require_results) core:math/linalg procedures
2023-05-22 12:05:56 +01:00
KyleRhoads45
87a1792677
Fix #2545 - Typo in vec4 lerping procedures
2023-05-18 13:19:22 -07:00
Jesse Stiller
9528325777
linalg/extended radians and degrees fixed
...
Renamed them to `to_degrees` and `to_radians` to match the same scalar functions in math--plus it helps clarify exactly what they do. And fixed a bug where the array overloads weren't being indexed.
2023-04-27 20:49:59 +10:00
Mostafa Saad
5fdc9fa3b6
Fix #2389
2023-03-17 00:29:50 +02:00
Said Al Attrach
70e48e39a4
Fix typo in linalg.any
2022-12-13 12:18:58 +01:00
gingerBill
df19c48da8
Add doc.odin
2022-11-03 13:36:00 +00:00
gingerBill
320b84df4f
Fix #2052 typo in linalg.max_single
2022-09-17 10:20:52 +01:00
Phil
9064ebfe97
Change math/linalg/general.odin vector_length and vector_normalize to only accept vectors of float types rather than any numeric type
2022-08-15 16:45:54 -07:00
Luxko
00e704b216
fix linalg.angle_from_quaternion
...
fixes #1894 .2:
```odin
package laa
import "core:fmt"
import la "core:math/linalg"
main:: proc() {
angle := f32(0.5)
quat := la.quaternion_angle_axis_f32(angle,la.Vector3f32{0,0,1})
fmt.printf("retreived: %0.8f\n", la.angle_from_quaternion(quat)) // should be 0.5, but wasn't
}
```
2022-07-23 00:59:45 +08:00
hfr4
30b7c8ad66
wrong variable names in functions
2022-06-14 18:20:38 +02:00
gingerBill
c81fd2e5dd
Fix #1644
2022-04-26 11:45:46 +01:00
gingerBill
ebb8ca7c26
Add round to linalg_glsl_math.odin
2022-01-30 21:35:05 +00:00
Jesse Stiller
62cc752066
Added round to HLSL and GLSL, and isinf/isfinite + isnan to HLSL
2022-01-30 13:57:01 +10:00
Jesse Stiller
d4ea02a877
Extraneous parameters in hlsl/glsl.saturate removed
...
This is a breaking change to anyone who used glsl/hlsl.saturate functions prior, but the y and z parameters never were used and do not conform to how the saturate function works in HLSL: https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-saturate
Note however GLSL does not contain a saturate function, but removing it does not accomplish anything good IMO.
2022-01-17 12:19:06 +10:00
gingerBill
80bd1eb615
Fix polymorphic matrix element with a minor hack
2022-01-10 12:19:49 +00:00
gingerBill
af612bc7e9
Update matrix types to be the native Odin matrix types
2022-01-10 11:32:27 +00:00
gingerBill
f15bb0b424
Fix quaternion casting
2022-01-03 19:45:27 +00:00
gingerBill
0d7cb02386
Fix conversion from float to quaternion
2021-12-31 23:20:14 +00:00
gingerBill
b9701340b8
Add linalg.matrix4_look_at_from_fru
2021-11-13 19:15:37 +00:00
gingerBill
d8e34bd9b7
Add core:math/linalg/hlsl
2021-11-04 17:08:59 +00:00
gingerBill
d551144841
Add inverse for dmatN types
2021-11-04 16:09:19 +00:00
gingerBill
84540d7aa2
Add smoothstep
2021-11-04 15:57:27 +00:00
gingerBill
95f36d4fa5
Minor reorganization
2021-11-04 14:54:55 +00:00