aboutsummaryrefslogtreecommitdiff
path: root/src/math.odin
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-03-06 18:55:27 -0500
committeriamcheeseman <[email protected]>2026-03-06 18:55:27 -0500
commit4c0c7682433a6da363ed8d608766fe8b52b70669 (patch)
tree988538c2e765abe93cfcc5d82885c9814ed37c2d /src/math.odin
parent3c7c93a2d844448ac9e8234418a786206a851596 (diff)
yayyy hugbug
Diffstat (limited to 'src/math.odin')
-rw-r--r--src/math.odin5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/math.odin b/src/math.odin
index bfc0013..fd81ac8 100644
--- a/src/math.odin
+++ b/src/math.odin
@@ -2,6 +2,7 @@ package demonchime
import "core:math"
import "core:math/linalg"
+import "core:math/rand"
import "fw"
@@ -19,3 +20,7 @@ dt_lerp_arr :: proc(a: [$N]$T, b: [N]T, t: T) -> [N]T {
dt := T(fw.get_delta_time())
return linalg.lerp(b, a, math.pow(0.5, dt * t))
}
+
+coin_flip :: proc(rng := context.random_generator) -> bool {
+ return rand.int32_range(1, 3) == 1
+}