|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim Cook" <z99### [at] bellsouthnet> wrote
> Isn't there a better way of wording the docs there?
>
> --
> Tim Cook
>
If you can think of one you could propose it on
povray.documentation.inbuilt.
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim Cook" <z99### [at] bellsouthnet> wrote in message
news:437b1f79$1@news.povray.org...
>
> 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?
>
Dunno - but IMHO it is a basic, albeit slippery, principle.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Cook <z99### [at] bellsouthnet> wrote:
> Isn't there a better way of wording the docs there?
Mathematicians understand it perfectly. Programmers understand it
perfectly.
How can you explain it to someone who is neither? You would have to
start from number theory principles...
What is curious is that people get confused but they don't try to think
about it at all. How would you understand "if A is negative, returns -A"?
If it said "if A is negative, returns A" then that would obviously mean
that it doesn't change it. If it, however, returns "-A" then it has to
change it somehow because "A" is not the same as "-A".
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> What is curious is that people get confused but they don't try to think
> about it at all. How would you understand "if A is negative, returns -A"?
I see "if A is negative" and parse "-A", then the -A following that
makes me think "-A, returns -A", instead of "if the number is negative,
the sign is dropped".
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |