package demonchime import "core:math" import "core:math/linalg" import "core:math/rand" import "fw" dt_lerp :: proc { dt_lerp_f32, dt_lerp_arr, } dt_lerp_f32 :: proc(a: f32, b: f32, t: f32) -> f32 { dt := f32(fw.get_delta_time()) return math.lerp(b, a, math.pow(0.5, dt * t)) } 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 }