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


You need to login to view comments.