Distance Between Two Points


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. dx = x2 – x1;
  2. dy = y2 – y1;
  3. dist = Math.sqrt(dx*dx + dy*dy);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.