Merge branch 'master' of https://github.com/Araq/Nimrod
This commit is contained in:
commit
27215e89f9
3 changed files with 13 additions and 3 deletions
|
|
@ -302,12 +302,12 @@ const # magic checked op; magic unchecked op; checked op; unchecked op
|
|||
["", "", "($1 <= $2)", "($1 <= $2)"], # LeB
|
||||
["", "", "($1 < $2)", "($1 < $2)"], # LtB
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqRef
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqProc
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqUntracedRef
|
||||
["", "", "($1 <= $2)", "($1 <= $2)"], # LePtr
|
||||
["", "", "($1 < $2)", "($1 < $2)"], # LtPtr
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqCString
|
||||
["", "", "($1 != $2)", "($1 != $2)"], # Xor
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqProc
|
||||
["NegInt", "", "NegInt($1)", "-($1)"], # UnaryMinusI
|
||||
["NegInt64", "", "NegInt64($1)", "-($1)"], # UnaryMinusI64
|
||||
["AbsInt", "", "AbsInt($1)", "Math.abs($1)"], # AbsI
|
||||
|
|
@ -402,12 +402,12 @@ const # magic checked op; magic unchecked op; checked op; unchecked op
|
|||
["", "", "($1 <= $2)", "($1 <= $2)"], # LeB
|
||||
["", "", "($1 < $2)", "($1 < $2)"], # LtB
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqRef
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqProc
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqUntracedRef
|
||||
["", "", "($1 <= $2)", "($1 <= $2)"], # LePtr
|
||||
["", "", "($1 < $2)", "($1 < $2)"], # LtPtr
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqCString
|
||||
["", "", "($1 != $2)", "($1 != $2)"], # Xor
|
||||
["", "", "($1 == $2)", "($1 == $2)"], # EqProc
|
||||
["NegInt", "", "NegInt($1)", "-($1)"], # UnaryMinusI
|
||||
["NegInt64", "", "NegInt64($1)", "-($1)"], # UnaryMinusI64
|
||||
["AbsInt", "", "AbsInt($1)", "Math.abs($1)"], # AbsI
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,7 @@ proc scale*(p:var TPoint3d,fac:float) {.inline.}=
|
|||
proc scale*(p:var TPoint3d,fac:float,org:TPoint3d){.inline.}=
|
||||
## Scales the point in place `fac` times with `org` as origin.
|
||||
p.x=(p.x - org.x) * fac + org.x
|
||||
p.y=(p.x - org.y) * fac + org.y
|
||||
p.y=(p.y - org.y) * fac + org.y
|
||||
p.z=(p.z - org.z) * fac + org.z
|
||||
|
||||
proc stretch*(p:var TPoint3d,facx,facy,facz:float){.inline.}=
|
||||
|
|
|
|||
10
tests/js/testmagic.nim
Normal file
10
tests/js/testmagic.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
cmd: "nimrod js --hints:on -r $# $#"
|
||||
output: '''true'''
|
||||
"""
|
||||
|
||||
# This file tests some magic
|
||||
|
||||
var foo = cstring("foo")
|
||||
var bar = cstring("foo")
|
||||
echo(foo == bar)
|
||||
Loading…
Add table
Add a link
Reference in a new issue