master
ブランチ master
ShaderPlayground / deps / glm / glm / ext / scalar_constants.inl
561 B、18行 生 Blame 履歴
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, "'epsilon' only accepts floating-point inputs");
16 return static_cast<genType>(3.14159265358979323846264338327950288);
17 }
18} //namespace glm