Clutter Engine 0.0.1
Loading...
Searching...
No Matches
scalar_constants.inl
1#include <limits>
2
3namespace glm
4{
5 template<typename genType>
6 GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon()
7 {
8 GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'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 GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'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
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
Definition scalar_constants.inl:6
GLM_FUNC_DECL GLM_CONSTEXPR genType pi()
Return the pi constant for floating point types.
Definition scalar_constants.inl:13
GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two()
Return the value of cos(1 / 2) for floating point types.
Definition scalar_constants.inl:20
Core features
Definition common.hpp:21