distance formulas

BlitzMax Forums/BlitzMax Programming/distance formulas

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well in the cases where you only need to see which is farther, you can calculate distance like so:

D = X2-X1^2 + Y2-Y1^2

And compare those "squared distance" values.