POV-Ray : Newsgroups : povray.general : abs()? Server Time
29 Nov 2024 17:37:13 EST (-0500)
  abs()? (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Daniel Hulme
Subject: Re: abs()?
Date: 16 Nov 2005 15:02:43
Message: <20051116200255.3391aef0@surreal>
>   How can you explain it to someone who is neither? You would have to
> start from number theory principles...
returns -1 * A?

-- 
Stop the infinite loop, I want to get off!    http://surreal.istic.org/ 
Paraphernalia/Never hides your broken bones,/ And I don't know why you'd
want to try:/ It's plain to see you're on your own.        -- Paul Simon
v2sw6PChw7ln6pr4ck5ma9u8Lw3m2l7Di2e6t2TNDb9Ien6g6a2Xr1p6/9 hackerkey.com


Post a reply to this message

From: Kenneth
Subject: Re: abs()?
Date: 17 Nov 2005 01:05:01
Message: <web.437c1c86e81deef51358cd00@news.povray.org>
Tim Cook <z99### [at] bellsouthnet> wrote:
> From the documentation:
>
> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
> returns A."
>

Not too long ago, this very subject was addressed in a different thread..

<43401940$1@news.povray.org>

The level of confusion that abs() seems to generate among some users DOES
indicate, IMHO, that a "better" description is needed in the docs.  OR
perhaps just an example of its use! In fact, there are other "math"
keywords that could use examples as well, to help the non-mathematician.

Ken


Post a reply to this message

From: Rune
Subject: Re: abs()?
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

From: Darren New
Subject: Re: abs()?
Date: 18 Nov 2005 11:55:48
Message: <437e0794$1@news.povray.org>
Rune wrote:
> Not a replacement, but maybe an addition?

I find examples usually help, too.
   So, abs(0) is 0, abs(12) is 12, and abs(-5) is 5. The result is never 
negative.

-- 
   Darren New / San Diego, CA, USA (PST)
    Sabotage? Communist conspiracy? Or just
    Microsoft again? Only time will tell.


Post a reply to this message

From: Rune
Subject: Re: abs()?
Date: 19 Nov 2005 08:37:22
Message: <437f2a92$1@news.povray.org>
Darren New wrote:
> Rune wrote:
>> Not a replacement, but maybe an addition?
>
> I find examples usually help, too.
>   So, abs(0) is 0, abs(12) is 12, and abs(-5) is 5. The result is
> never negative.

Yes, agreed.

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

<<< Previous 10 Messages Goto Initial 10 Messages

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