Distance, Length, Magnitude ?!?

Started by
4 comments, last by Endemoniada 20 years, 8 months ago
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.
Advertisement
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]
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.
Thanks guys,

I thought I was losing it for a moment.

:o)

This topic is closed to new replies.

Advertisement