Difference between revisions of "^"
From WikiManual
(New page: Picks two numbers in the stack and returns the XOR comparison of their bits. 0 0 ^ = 0 1 0 ^ = 1 1 1 ^ = 0 -1 0 ^ = -1 -1 -1 ^ = 0 It always returns zero when both number...) |
(No difference)
|
Latest revision as of 12:43, 11 August 2007
Picks two numbers in the stack and returns the XOR comparison of their bits.
0 0 ^ = 0 1 0 ^ = 1 1 1 ^ = 0 -1 0 ^ = -1 -1 -1 ^ = 0
It always returns zero when both numbers are equal.
It always returns a negative number when both numbers are different and one number is negative.
It always returns a positive number when both numbers are different and positive.
Possible uses
-1 .shoot *.refeye *.myeye ^ sgn abs mult store
Will shoot at anything with different amount of eyes.