simplification
This commit is contained in:
parent
1605fdfc99
commit
905946da06
8 changed files with 138 additions and 608 deletions
|
|
@ -19,9 +19,4 @@ export default class Point {
|
|||
this.y - other.y
|
||||
)
|
||||
}
|
||||
distance(other) {
|
||||
const diffX = this.x - other.x
|
||||
const diffY = this.y - other.y
|
||||
return Math.sqrt(diffX * diffX + diffY * diffY)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue