(vec: Vec2)
| 72 | return Math.atan2(this.y, this.x); |
| 73 | } |
| 74 | angleTo(vec: Vec2): number { |
| 75 | return Math.atan2(this.cross(vec), this.dot(vec)); |
| 76 | } |
| 77 | cosineTo(vec: Vec2) { |
| 78 | const dotProduct = this.dot(vec); |
| 79 | const magnitudeProduct = this.length() * vec.length(); |