84 Commits

Author SHA1 Message Date
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
gingerBill
3accf4048e Add f64 variants of all types and procedures 2021-11-04 14:52:03 +00:00
gingerBill
eb05879148 Add more comments 2021-11-04 14:25:34 +00:00
gingerBill
a882118c56 Add comments 2021-11-04 14:20:47 +00:00
gingerBill
57d15ac6e7 Remove unneeded suffixes 2021-11-04 14:11:34 +00:00
gingerBill
e3cfdf6982 Remove build tag 2021-11-04 14:11:04 +00:00
gingerBill
017fe10762 core:math/linalg/glsl - GLSL-like mathematics types and operations 2021-11-04 14:09:12 +00:00
gingerBill
bff66ff600 Remove unnecessary operations 2021-09-08 19:07:25 +01:00
gingerBill
720884e0f1 Strip even more semicolons if followed by a } or ) on the same line 2021-08-31 23:47:57 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
f0437a4242 Enforce core:builtin and core:intrinsics for imports 2021-08-21 13:44:16 +01:00
gingerBill
4285b58aaa Add #no_bounds_check to linalg procedures 2021-07-03 14:38:41 +01:00
gingerBill
ad22eda87c Improve linalg.transpose type determination for square matrices 2021-06-28 13:23:28 +01:00
gingerBill
f41150f8e9 Fix transposing 2021-06-04 15:10:53 +01:00
gingerBill
21adad4e09 Fix typo 2021-06-04 15:09:55 +01:00
gingerBill
b9888f8f68 Fix linalg.transpose 2021-06-03 10:05:05 +01:00
vassvik
8169cb4853 Fix missing newlines in core:math/linalg/specific.odin 2021-04-09 09:21:20 +02:00
gingerBill
0fc04a939e Add f16 support to core:math/linalg 2021-04-01 11:12:40 +01:00
gingerBill
43ac6ca8f4 Add linalg.matrix_cast 2021-03-26 16:24:56 +00:00
gingerBill
62d2656f69 Add linalg.matrix_cast 2021-03-26 14:33:46 +00:00
Jeroen van Rijn
d80670fe0c Fix typo in cubic(). 2021-03-16 16:34:59 +01:00