summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure')
-rwxr-xr-xlib/pure/hashes.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index 9c086c675..ac6d3c3ce 100755
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -122,3 +122,7 @@ proc hash*[T: tuple](x: T): THash =
     result = result !& hash(f)
   result = !$result
 
+proc hash*(x: float): THash {.inline.} =
+  var y = x + 1.0
+  result = cast[ptr THash](addr(y))[]
+