浏览代码

Fix typo in modf_f32

gingerBill 6 年之前
父节点
当前提交
e3d7e6f76a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      core/math/math.odin

+ 2 - 2
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;