POV-Ray : Newsgroups : povray.general : abs()? : Re: abs()? Server Time
1 Aug 2024 10:19:20 EDT (-0400)
  Re: abs()?  
From: Anthony D  Baye
Date: 16 Nov 2005 00:34:24
Message: <437ac4e0$1@news.povray.org>
Tim Cook wrote:
>  From the documentation:
> 
> "abs(A) Absolute value of A. If A is negative, returns -A otherwise 
> returns A."
> 
> er...that isn't what absolute value is.  absolute value of A is +A, if A 
> is negative, the absolute value is +A, not -A.  is the behaviour of POV 
> or the documentation incorrect?
> 
The definition of absolute value is as follows:

|x| is the distance between a given number (x) and 0 on a number line.

Thus:
abs(x) returns the MAGNITUDE of x, such that |x|=|-x|.  This value is 
always positive.

ADB


Post a reply to this message

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