Rounding Was: Re: intersection and ExoticaX
- Posted by euphoria at carlw.legend.uk.com Jul 06, 2001
- 411 views
Jiri wrote: > function round(object x) -- recursive > if atom(x) then > return floor(x+0.5) > end if > for i=1 to length(x) do > x[i] = round(x[i]) > end for > return x > end function Okay, I'll bite. Why not just: function round(object x) return floor(x+.5) end function ...? floor() is usable on sequences after all, as is adding 0.5. It's faster by 30ish% too. Or am I asking for trouble posting this sort of thing again. Cowering in the corner, Carl -- Carl R White - aka - Cyrek eMail: carlw at legend.co.uk cyrek at bigfoot.com URL: nope none nada zip