quote:
Original post by UnshavenBastard
quote: " I've seen that before. I always thought it was silly though, because is sqrt(x^2 + y^2 +
z^2) not equal to (|x| + |y| + |z|)? "
Nope.
Your x,y,z are real numbers here, where || means "absolute value", in other words
"without sign".
The eq. sqrt(x^2 + y^2 + z^2) is just pythagoras, and sqares are not done by
not caring about the sign, of course :-)
(well, of course, after squaring, you'll have no sign, though)
With vectors, || means "magnitude". So |vector| = sqrt(vx^2 + vy^2 + vz^2).
Huh.
I would have said, "(x + y + z)" instead of "(|x| + |y| + |z|)," but suppose x is negative. Then x * x would equal a positive number, and sqrt(x * x) would equal either x, being a negative, or -x, being a positive (remember that multiplying a number by -1 changes its sign). For this reason, I decided to use the absolute values of x, y, and z, but now I know that || can also mean the magnitude of a vector.
![](smile.gif)
Edited by - Some Guy on January 3, 2002 2:35:16 PM