Re: Absolute
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Jun 17, 2000
- 539 views
On Mon, 12 Jun 2000 09:39:32 -0400, Carl R. White <cyrek at BIGFOOT.COM> wrote: >The 'sequence-magic' abs() function is: > >function abs(object x) > -- The bit in the outer brackets is normally in the function "sgn()" > return x * ( (x>0)-(x<0) ) >end function Or you could use something I saw a while ago... function abs(atom x) return sqrt(x * x) end function I always use it, and it's served me well