Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. function distance(x0, y0, x1, y1) {
  2. // returns the length of a line segment
  3. const x = x1 - x0;
  4. const y = y1 - y0;
  5. return Math.sqrt(x * x + y * y);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement