From e3d7e6f76a91aeba351c9d3a1a3add21f2e439ab Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 20 Dec 2018 18:11:27 +0000 Subject: [PATCH] Fix typo in modf_f32 --- core/math/math.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;