From d247ba4751d8189082849e114e3d4a6106b0d053 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 25 Feb 2018 15:09:16 +0000 Subject: Hexadecimal floats for "perfect values" 0h42f60000 == 123; use `bit_cast` in compiler --- src/map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index a08070656..a22b4c162 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -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(f); return h; } -- cgit v1.2.3