#ifndef PW_CORE_MATH_HPP
#define PW_CORE_MATH_HPP

#include <cmath>

namespace pw {

const static double __PW_PI = 3.1415926535897932384626433832795028841971693993751058209;

template <typename T>
inline const T pi() { return static_cast<T>(__PW_PI); }

template <typename T>
inline static double rad_to_deg(const T& angle_in_radian) {
    return static_cast<T>(angle_in_radian * T(180.) / pi<T>());
}

template <typename T>
inline static double deg_to_rad(const T& angle_in_degree) {
    return static_cast<T>(angle_in_degree * pi<T>() / T(180.));
}

}

#endif
