summary refs log tree commit diff stats
path: root/lib/pure/math.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-03-04 23:42:19 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-03-04 23:42:19 +0100
commitf45a2f23b04aa1d37b482ba3d07980b73ce6a75d (patch)
tree5761b1d5dfea492f14052b3d2d640a374e49a454 /lib/pure/math.nim
parent048811b2be4ac05415e0ef67777dfd297f7be4d6 (diff)
downloadNim-f45a2f23b04aa1d37b482ba3d07980b73ce6a75d.tar.gz
bugfix: macro evaluation; added colors.extractRGB
Diffstat (limited to 'lib/pure/math.nim')
-rwxr-xr-xlib/pure/math.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index cf4b6d95c..8e3dd4bdb 100755
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -172,6 +172,8 @@ when not defined(ECMAScript):
   proc randomize() = srand(gettime(nil))
   proc random(max: int): int = return int(rand()) mod max
 
+  proc trunc*(x: float): float {.importc: "trunc", nodecl.}
+
 else:  
   proc mathrandom(): float {.importc: "Math.random", nodecl.}
   proc mathfloor(x: float): float {.importc: "Math.floor", nodecl.}