Lucas Perlind
8b680254ee
Better guarantee boundaries of floating point rand
2023-08-18 11:19:01 +10:00
Lucas Perlind
b31d8b1ad0
Update rand documentation about floats
2023-08-16 21:13:56 +10:00
gingerBill
67f48aca96
Fix _random_u64
2023-08-15 11:06:12 +01:00
gingerBill
d13bed9a0a
Change algorithm to work on 64-bit integers rather than 32-bit integers internally
2023-08-15 10:53:59 +01:00
gingerBill
904c48b11a
Fix range comment from (0, n] to [0, n)
2023-08-15 10:36:00 +01:00
gingerBill
2a42dab108
Merge pull request #2661 from Beefster09/fixed-f64-conversion
...
Fix conversions between fixed point numbers and f64
2023-08-07 11:00:42 +01:00
gingerBill
5dba08fb3b
Keep -vet happy
2023-07-31 12:19:25 +01:00
Justin Snyder
d4194962b0
Update fixed.odin
2023-07-15 23:43:14 -06:00
gingerBill
17562e476f
Remove math usage of raw LLVM intrinsic prototypes
2023-07-07 23:13:37 +01:00
gingerBill
1ecb4aa9aa
Begin work on core:math/cmplx
...
`complex*` types only at the moment, `quaternion*` types coming later
2023-06-28 13:20:23 +01:00
gingerBill
0180a4fcd4
Add math.sincos
2023-06-28 12:57:09 +01:00
gingerBill
866a9fdf19
Actually add math.hypot
2023-06-28 12:19:45 +01:00
gingerBill
20e954a864
Add math.hypot
2023-06-28 12:16:49 +01:00
gingerBill
3dec55f009
Replace x in &y Use &v in y syntax through core & vendor for switch/for statements
2023-06-26 15:42:57 +01:00
gingerBill
9b54b99bf6
Use positional and named arguments within the core library
2023-06-21 01:17:05 +01:00
Lucas Perlind
ebe5636307
Document core:math/rand and add 'possible output'
...
Possible output allows us to just type check a test
and have some sort of output field in the docs but
not actually verify it matches stdout
2023-05-31 09:49:12 +10:00
gingerBill
40a8ed535a
Add @(require_results) to core:math/ease
2023-05-22 20:43:19 +01:00
gingerBill
18c5a53685
Add @(require_results) and contextless to procedures in core:math/bits
2023-05-22 12:13:44 +01:00
gingerBill
a1172d31f4
Add @(require_results) to core:math/fixed
2023-05-22 12:11:53 +01: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
gingerBill
89a233ccd2
Add @(require_results) to core:math/noise
2023-05-22 12:00:17 +01:00
gingerBill
2df6cabee0
Add @(require_results) to core:math/rand
2023-05-22 11:59:44 +01:00
gingerBill
82023cd629
Add @(require_results) to core:math procedures
2023-05-22 11:58:01 +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
gingerBill
7cda64e52d
Add parentheses around or_return uses in an unary expression
2023-04-27 11:17:23 +01: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
2127dc56b1
Add math.pow10
2022-11-29 14:31:56 +00:00
gingerBill
0c25f7cdc5
Improve core:math procedures and add loads of unit tests
2022-11-29 11:39:44 +00:00
gingerBill
e5c243ee93
Fix atan2 by swapping the arguments internally
2022-11-29 09:19:45 +00:00
gingerBill
92e406cef0
Implement asin in native Odin
2022-11-04 14:30:18 +00:00
gingerBill
269913ede0
Implement acos in native Odin
2022-11-04 14:26:31 +00:00
gingerBill
ff36b754cb
Fix atrig functions
2022-11-04 13:53:28 +00:00
gingerBill
df19c48da8
Add doc.odin
2022-11-03 13:36:00 +00:00
gingerBill
f7211408fc
Merge pull request #1544 from FancyKillerPanda/build_ignore
...
Changed `//+ignore` to `//+build ignore` and emit a warning for unknown tags
2022-11-03 12:58:26 +00:00
Jeroen van Rijn
a51943e27f
Add core:math/rand.choice
2022-10-23 04:18:58 +02:00
gingerBill
320b84df4f
Fix #2052 typo in linalg.max_single
2022-09-17 10:20:52 +01:00
gingerBill
39728b8bfb
Add the builtin procedures abs, clamp min, max to core:math as aliases
2022-09-08 15:08:53 +01:00
Phil
8482f943ea
fix ease.odin compile error from missing comma
2022-08-31 14:14:06 -07: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
gingerBill
208f168564
Correct assignment
2022-08-15 16:31:59 +01:00
gingerBill
737bccbd5e
Add math.divmod and math.floor_divmod
2022-08-15 16:31:43 +01:00
blake
b2b0043875
fixed math.log2
2022-08-06 06:19:47 -04:00
cui fliter
dc8b7a0eb8
fix some typos
...
Signed-off-by: cui fliter <imcusg@gmail.com >
2022-08-05 20:10:20 +08: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
Yeongju Kang
4e8bc0786d
fix parameter for atan2 in procedure asin
2022-07-22 15:48:06 +09:00
Michael Kutowski
b313d09c2c
flux fixed key deletion and generic in flux_to
2022-06-28 18:27:52 +02:00