mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix typo in modf_f32
This commit is contained in:
+2
-2
@@ -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 {
|
if e < 32-9 {
|
||||||
i &~= 1<<(32-12-e) - 1;
|
i &~= 1<<(32-9-e) - 1;
|
||||||
}
|
}
|
||||||
int = transmute(f32)i;
|
int = transmute(f32)i;
|
||||||
frac = x - int;
|
frac = x - int;
|
||||||
|
|||||||
Reference in New Issue
Block a user