Hexadecimal floats for "perfect values" 0h42f60000 == 123; use bit_cast in compiler

This commit is contained in:
gingerBill
2018-02-25 15:09:16 +00:00
parent 27b7dc336a
commit d247ba4751
9 changed files with 70 additions and 54 deletions
+1 -1
View File
@@ -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;
}