diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-04 23:42:19 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-04 23:42:19 +0100 |
commit | f45a2f23b04aa1d37b482ba3d07980b73ce6a75d (patch) | |
tree | 5761b1d5dfea492f14052b3d2d640a374e49a454 /lib/pure/math.nim | |
parent | 048811b2be4ac05415e0ef67777dfd297f7be4d6 (diff) | |
download | Nim-f45a2f23b04aa1d37b482ba3d07980b73ce6a75d.tar.gz |
bugfix: macro evaluation; added colors.extractRGB
Diffstat (limited to 'lib/pure/math.nim')
-rwxr-xr-x | lib/pure/math.nim | 2 |
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.} |