| 1 | #include <limits> |
| 2 | |
| 3 | namespace glm |
| 4 | { |
| 5 | template<typename genType> |
| 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() |
| 7 | { |
| 8 | static_assert(std::numeric_limits<genType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'epsilon' only accepts floating-point inputs"); |
| 9 | return std::numeric_limits<genType>::epsilon(); |
| 10 | } |
| 11 | |
| 12 | template<typename genType> |
| 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() |
| 14 | { |
| 15 | static_assert(std::numeric_limits<genType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'pi' only accepts floating-point inputs"); |
| 16 | return static_cast<genType>(3.14159265358979323846264338327950288); |
| 17 | } |
| 18 | |
| 19 | template<typename genType> |
| 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() |
| 21 | { |
| 22 | return genType(0.877582561890372716130286068203503191); |
| 23 | } |
| 24 | } //namespace glm |