* polar coordinate system (rho, theta) * * @param rho [out], the magnitude of the vector. * @param theta [out], the return value is in the range [-pi, pi]. */
| 113 | * @param theta [out], the return value is in the range [-pi, pi]. |
| 114 | */ |
| 115 | vec2<T> polar() const |
| 116 | { |
| 117 | T _rho = length(); |
| 118 | T _theta = std::atan2(y, x); |
| 119 | return vec2<T>(_rho, _theta); |
| 120 | } |
| 121 | |
| 122 | vec2<T> project(vec2<T>& direction, bool normalized = false) const |
| 123 | { |
nothing calls this directly
no outgoing calls
no test coverage detected