10 #ifndef VISR_LIBEFL_CARTESIAN_SPHERICAL_CONVERSION_HPP_INCLUDED 11 #define VISR_LIBEFL_CARTESIAN_SPHERICAL_CONVERSION_HPP_INCLUDED 30 template<
typename T >
33 return std::make_tuple( std::cos( az )*std::cos( el ) * radius,
34 std::sin( az )*std::cos( el ) * radius,
35 std::sin( el ) * radius );
47 template<
typename T >
50 T
const radius = std::sqrt( x*x + y*y + z*z );
51 T
const az = std::atan2( y, x );
52 T
const el = std::asin( z / radius );
53 return std::make_tuple( az, el, radius );
59 #endif // #ifndef VISR_LIBEFL_CARTESIAN_SPHERICAL_CONVERSION_HPP_INCLUDED std::tuple< T, T, T > spherical2cartesian(T az, T el, T radius)
Definition: cartesian_spherical_conversion.hpp:31
std::tuple< T, T, T > cartesian2spherical(T x, T y, T z)
Definition: cartesian_spherical_conversion.hpp:48
Definition: options.cpp:10