Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. class Point {
  2. constructor(x1, x2) {
  3. this.x1 = x1;
  4. this.x2 = x2;
  5. }
  6. get distance() {
  7. return (this.x1 ** 2 + this.x2 ** 2) ** 0.5;
  8. }
  9. static distance(x1, x2) {
  10. return (x1 ** 2 + x2 ** 2) ** 0.5;
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement