Archived

This topic is now archived and is closed to further replies.

Endemoniada

Distance, Length, Magnitude ?!?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Give me your member name and password b/c I''m not a member and it takes a long time fill out forms.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites