bugfix: macro evaluation; added colors.extractRGB

This commit is contained in:
Andreas Rumpf 2010-03-04 23:42:19 +01:00
commit f45a2f23b0
8 changed files with 190 additions and 154 deletions

View file

@ -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.}