bugfix: macro evaluation; added colors.extractRGB
This commit is contained in:
parent
048811b2be
commit
f45a2f23b0
8 changed files with 190 additions and 154 deletions
|
|
@ -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.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue