Re: round
- Posted by "Carl R. White" <cyrek at BIGFOOT.COM> Jun 07, 2000
- 466 views
I just can't resist threads like this... Rolf said: function round_gm(atom x) -- Round to greatest magnitude if x < 0 then return floor(x - 0.5) else return floor(x + 0.5) end if end function Rolf's function 'Carl'-ised function round_gm(object x) -- Round to greatest magnitude return floor(x-.5)*(x<0)+floor(x+.5)*(x>0) end function Carl