summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-09-09 01:08:13 +0200
committerAraq <rumpf_a@web.de>2012-09-09 01:08:13 +0200
commit6d94e4590244fe6174181ca4d0928a06d5c6a257 (patch)
treef6ce86ef812cf00eee1c002fd104bbb3de7c6160 /lib/pure
parentd3d9d32c35ae6a841ad9e48da61e1a6e88b3904c (diff)
parent9c63d12cef05709c79ce6d0f6b0cffd0f2243fe7 (diff)
downloadNim-6d94e4590244fe6174181ca4d0928a06d5c6a257.tar.gz
Merge branch 'master' of github.com:Araq/Nimrod
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))[]
+