POV-Ray : Newsgroups : povray.general : abs()? : Re: abs()? Server Time
1 Aug 2024 16:26:23 EDT (-0400)
  Re: abs()?  
From: Rune
Date: 18 Nov 2005 03:37:11
Message: <437d92b7@news.povray.org>
Tim Cook wrote:
> Anthony D. Baye wrote:
>>> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
>>> returns A."
>> Thus:
>> abs(x) returns the MAGNITUDE of x, such that |x|=|-x|.  This value is
>> always positive.
>
> Ahhhh ok, I just stumbled on the minus sign in confusion, as if you're
> not paying close attention it looks redundant and as though it
> returns a negative number.  Isn't there a better way of wording the
> docs there?

Not a replacement, but maybe an addition?

"Thus, no matter if A is positive or negative (or zero), abs(A) will return 
a positive number (or zero)."

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.