Distance, Length, Magnitude ?!?
Hi guys,
Maybe I''m crazy but I always thought the magnitude of a vector is the same as it''s length and that the distance between two points is the length of the vector created by subtracting one point from the other.
Take a look at the code in this tutorial on Gamasutra:
http://www.gamasutra.com/features/20020118/vandenhuevel_02.htm
First he finds the distance between two points, then a few code lines after that he finds the vector between those same two points, then a few lines after that he finds the length of that same vector. wtf is that ?
Thanks.
July 25, 2003 03:54 PM
Give me your member name and password b/c I''m not a member and it takes a long time fill out forms.
quote:
Original post by Endemoniada
...wtf is that ?
Unoptimized code.
delete this;
From what you've told me, you're right. Distance, length, and magnitude are all equivalent. That code would need some optimisin'.
[edited by - doc on July 25, 2003 10:58:27 PM]
[edited by - doc on July 25, 2003 10:58:27 PM]
My stuff.Shameless promotion: FreePop: The GPL god-sim.
Distance between two points: the magnitude of the vector formed by subtracting one point from the other.
Magnitude of a vector: the square root of the sum of the squares of the vector''s terms. In other words, sqrt(x2+y2+z2).
Length: basically the same thing as magnitude. not often used.
How appropriate. You fight like a cow.
Magnitude of a vector: the square root of the sum of the squares of the vector''s terms. In other words, sqrt(x2+y2+z2).
Length: basically the same thing as magnitude. not often used.
How appropriate. You fight like a cow.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement