diff --git a/core/math/math.odin b/core/math/math.odin index 5b24f0c0d..68f19007d 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -186,8 +186,8 @@ modf_f32 :: proc(x: f32) -> (int: f32, frac: f32) { i := transmute(u32)x; e := uint(i>>shift)&mask - bias; - if e < 32-12 { - i &~= 1<<(32-12-e) - 1; + if e < 32-9 { + i &~= 1<<(32-9-e) - 1; } int = transmute(f32)i; frac = x - int;