* Vector addition * * @param vector The vector to be added. * @returns The sum-vector.
(vector)
| 27 | * @returns The sum-vector. |
| 28 | */ |
| 29 | add(vector) { |
| 30 | const x = this.x + vector.x |
| 31 | const y = this.y + vector.y |
| 32 | return new Vector2(x, y) |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Vector subtraction |
no outgoing calls
no test coverage detected