Returns a vector with the same length that is orthogonal to this one.
| 47 | |
| 48 | /// Returns a vector with the same length that is orthogonal to this one. |
| 49 | inline Vector2 getOrthogonal(bool polarity = true) const { |
| 50 | return polarity ? Vector2(-y, x) : Vector2(y, -x); |
| 51 | } |
| 52 | |
| 53 | /// Returns a vector with unit length that is orthogonal to this one. |
| 54 | inline Vector2 getOrthonormal(bool polarity = true, bool allowZero = false) const { |