Return one unit orthogonal vector of the current vector
| 44 | |
| 45 | // Return one unit orthogonal vector of the current vector |
| 46 | Vector2 Vector2::getOneUnitOrthogonalVector() const { |
| 47 | |
| 48 | decimal l = length(); |
| 49 | assert(l > MACHINE_EPSILON); |
| 50 | |
| 51 | return Vector2(-y / l, x / l); |
| 52 | } |
no test coverage detected