Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Point {
- constructor(x, y) {
- this.x = x;
- this.y = y;
- }
- static distance = (p1, p2) => { return Math.sqrt((p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2);}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement