quote:Original post by honayboyz
and at that, do i even need to square them? or cout i just get absolute value, which ever is faster?
You may need to square them because usually when you''re looking at distances:
d^2 = x^2 + y^2
You need to square both values and then add them to get the distance squared. Otherwise this will skew your math:
if x1 = 6 and y1 = 6
and x2 = 10 and y2 = 0
then if you don''t square them and just add them, your first point will appear farther away than your second point. Which it isn''t.