I'm not sure what this procedure does. If anyone could tell me, it would be appreciated.
proc
sign(x) //Should get bonus points for being the most compact code in the world!
return ((x<0)?-1:((x>0)?1:0))
~~Dragon Lord~~
PS: Yes, I got this from AbyssDragon's Math library.
</0>
ID:267668
Aug 12 2003, 3:46 am
|
|
Returns -1 if x is under 0, 1 if it is over 0, or 0 if it is equal to 0.