Browse Source

Fix typo in modf_f32

gingerBill 6 years ago
parent
commit
e3d7e6f76a
1 changed files with 2 additions and 2 deletions
  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;
 	i := transmute(u32)x;
 	e := uint(i>>shift)&mask - bias;
 	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;
 	int = transmute(f32)i;
 	frac = x - int;
 	frac = x - int;