Fix typo in modf_f32

This commit is contained in:
gingerBill
2018-12-20 18:11:27 +00:00
parent 5c3dc30dc0
commit e3d7e6f76a
+2 -2
View File
@@ -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;