Jump to content

Vector Distance Question


Guest Red Ocktober
 Share

Recommended Posts

One my friend say me to compare squares, not distances, because SQR is heavy command. So

 

dist1#=(v1.x-v2.x) * (v1.x-v2.x) + (v1.y-v2.y) * (v1.y-v2.y) + (v1.z-v2.z) * (v1.z-v2.z)

dist2#=(v1.x-v3.x) * (v1.x-v3.x) + (v1.y-v3.y) * (v1.y-v3.y) + (v1.z-v3.z) * (v1.z-v3.z)

 

if dist1<dist2 ....

 

Without SQR calcilations :)

 

P.S. Cool glasses Alien :)

"Better" is big enemy of "good"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...