(other)
| 733 | return new Vector2(this.x * x, this.y * y); |
| 734 | } |
| 735 | div(other) { |
| 736 | const { x , y } = typeof other === "number" ? { |
| 737 | x: other, |
| 738 | y: other |
| 739 | } : other; |
| 740 | return new Vector2(this.x / x, this.y / y); |
| 741 | } |
| 742 | neg() { |
| 743 | return new Vector2(-this.x, -this.y); |
| 744 | } |