20 #ifndef ANTKEEPER_GEOM_CARTESIAN_HPP
21 #define ANTKEEPER_GEOM_CARTESIAN_HPP
45 const T xx_yy = v.x() * v.x() + v.y() * v.y();
51 std::atan2(v.y(), v.x())
math::vec3< T > to_spherical(const math::vec3< T > &v)
Converts Cartesian (rectangular) coordinates to spherical coordinates.
vector< T, N > sqrt(const vector< T, N > &x)
Takes the square root of each element.
math::vec3< T > cartesian(const math::vec3< T > &v)
Converts PQW coordinates from spherical to Cartesian.