mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 23:14:59 -07:00
Hexadecimal floats for "perfect values" 0h42f60000 == 123; use bit_cast in compiler
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ gb_inline HashKey hash_integer(u64 u) {
|
||||
}
|
||||
gb_inline HashKey hash_f64(f64 f) {
|
||||
HashKey h = {HashKey_Default};
|
||||
h.key = *cast(u64 *)&f;
|
||||
h.key = bit_cast<u64>(f);
|
||||
return h;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user