diff --git a/glm/gtc/constants.hpp b/glm/gtc/constants.hpp index 7eca56de..eba10219 100644 --- a/glm/gtc/constants.hpp +++ b/glm/gtc/constants.hpp @@ -55,128 +55,128 @@ namespace glm /// Return the epsilon constant for floating point types. /// @todo Implement epsilon for half-precision floating point type. /// @see gtc_constants - template - GLM_CONSTEXPR T epsilon(); + template + genType epsilon(); /// Return 0. /// @see gtc_constants - template - GLM_CONSTEXPR T zero(); + template + genType zero(); /// Return 1. /// @see gtc_constants - template - GLM_CONSTEXPR T one(); + template + genType one(); /// Return the pi constant. /// @see gtc_constants - template - GLM_CONSTEXPR T pi(); + template + genType pi(); /// Return square root of pi. /// @see gtc_constants - template - GLM_CONSTEXPR T root_pi(); + template + genType root_pi(); /// Return pi / 2. /// @see gtc_constants - template - GLM_CONSTEXPR T half_pi(); + template + genType half_pi(); /// Return pi / 4. /// @see gtc_constants - template - GLM_CONSTEXPR T quarter_pi(); + template + genType quarter_pi(); /// Return 1 / pi. /// @see gtc_constants - template - GLM_CONSTEXPR T one_over_pi(); + template + genType one_over_pi(); /// Return 2 / pi. /// @see gtc_constants - template - GLM_CONSTEXPR T two_over_pi(); + template + genType two_over_pi(); /// Return 2 / sqrt(pi). /// @see gtc_constants - template - GLM_CONSTEXPR T two_over_root_pi(); + template + genType two_over_root_pi(); /// Return 1 / sqrt(2). /// @see gtc_constants - template - GLM_CONSTEXPR T one_over_root_two(); + template + genType one_over_root_two(); /// Return sqrt(pi / 2). /// @see gtc_constants - template - GLM_CONSTEXPR T root_half_pi(); + template + genType root_half_pi(); /// Return sqrt(2 * pi). /// @see gtc_constants - template - GLM_CONSTEXPR T root_two_pi(); + template + genType root_two_pi(); /// Return sqrt(ln(4)). /// @see gtc_constants - template - GLM_CONSTEXPR T root_ln_four(); + template + genType root_ln_four(); /// Return e constant. /// @see gtc_constants - template - GLM_CONSTEXPR T e(); + template + genType e(); /// Return Euler's constant. /// @see gtc_constants - template - GLM_CONSTEXPR T euler(); + template + genType euler(); /// Return sqrt(2). /// @see gtc_constants - template - GLM_CONSTEXPR T root_two(); + template + genType root_two(); /// Return sqrt(3). /// @see gtc_constants - template - GLM_CONSTEXPR T root_three(); + template + genType root_three(); /// Return sqrt(5). /// @see gtc_constants - template - GLM_CONSTEXPR T root_five(); + template + genType root_five(); /// Return ln(2). /// @see gtc_constants - template - GLM_CONSTEXPR T ln_two(); + template + genType ln_two(); /// Return ln(10). /// @see gtc_constants - template - GLM_CONSTEXPR T ln_ten(); + template + genType ln_ten(); /// Return ln(ln(2)). /// @see gtc_constants - template - GLM_CONSTEXPR T ln_ln_two(); + template + genType ln_ln_two(); /// Return 1 / 3. /// @see gtc_constants - template - GLM_CONSTEXPR T third(); + template + genType third(); /// Return 2 / 3. /// @see gtc_constants - template - GLM_CONSTEXPR T two_thirds(); + template + genType two_thirds(); /// Return the golden ratio constant. /// @see gtc_constants - template - GLM_CONSTEXPR T golden_ratio(); + template + genType golden_ratio(); /// @} } //namespace glm diff --git a/glm/gtc/constants.inl b/glm/gtc/constants.inl index f40c1b40..afe3ddf8 100644 --- a/glm/gtc/constants.inl +++ b/glm/gtc/constants.inl @@ -28,159 +28,159 @@ namespace glm { - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T epsilon() + template + GLM_FUNC_QUALIFIER genType epsilon() { - return std::numeric_limits::epsilon(); + return std::numeric_limits::epsilon(); } template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR half epsilon() + GLM_FUNC_QUALIFIER half epsilon() { return half(1.19209290e-007); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T zero() + template + GLM_FUNC_QUALIFIER genType zero() { - return T(0); + return genType(0); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T one() + template + GLM_FUNC_QUALIFIER genType one() { - return T(1); + return genType(1); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T pi() + template + GLM_FUNC_QUALIFIER genType pi() { - return T(3.14159265358979323846264338327950288); + return genType(3.14159265358979323846264338327950288); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_pi() + template + GLM_FUNC_QUALIFIER genType root_pi() { - return T(1.772453850905516027); + return genType(1.772453850905516027); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T half_pi() + template + GLM_FUNC_QUALIFIER genType half_pi() { - return T(1.57079632679489661923132169163975144); + return genType(1.57079632679489661923132169163975144); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T quarter_pi() + template + GLM_FUNC_QUALIFIER genType quarter_pi() { - return T(0.785398163397448309615660845819875721); + return genType(0.785398163397448309615660845819875721); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T one_over_pi() + template + GLM_FUNC_QUALIFIER genType one_over_pi() { - return T(0.318309886183790671537767526745028724); + return genType(0.318309886183790671537767526745028724); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T two_over_pi() + template + GLM_FUNC_QUALIFIER genType two_over_pi() { - return T(0.636619772367581343075535053490057448); + return genType(0.636619772367581343075535053490057448); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T two_over_root_pi() + template + GLM_FUNC_QUALIFIER genType two_over_root_pi() { - return T(1.12837916709551257389615890312154517); + return genType(1.12837916709551257389615890312154517); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T one_over_root_two() + template + GLM_FUNC_QUALIFIER genType one_over_root_two() { - return T(0.707106781186547524400844362104849039); + return genType(0.707106781186547524400844362104849039); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_half_pi() + template + GLM_FUNC_QUALIFIER genType root_half_pi() { - return T(1.253314137315500251); + return genType(1.253314137315500251); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_two_pi() + template + GLM_FUNC_QUALIFIER genType root_two_pi() { - return T(2.506628274631000502); + return genType(2.506628274631000502); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_ln_four() + template + GLM_FUNC_QUALIFIER genType root_ln_four() { - return T(1.17741002251547469); + return genType(1.17741002251547469); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T e() + template + GLM_FUNC_QUALIFIER genType e() { - return T(2.71828182845904523536); + return genType(2.71828182845904523536); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T euler() + template + GLM_FUNC_QUALIFIER genType euler() { - return T(0.577215664901532860606); + return genType(0.577215664901532860606); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_two() + template + GLM_FUNC_QUALIFIER genType root_two() { - return T(1.41421356237309504880168872420969808); + return genType(1.41421356237309504880168872420969808); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_three() + template + GLM_FUNC_QUALIFIER genType root_three() { - return T(1.73205080756887729352744634150587236); + return genType(1.73205080756887729352744634150587236); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T root_five() + template + GLM_FUNC_QUALIFIER genType root_five() { - return T(2.23606797749978969640917366873127623); + return genType(2.23606797749978969640917366873127623); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T ln_two() + template + GLM_FUNC_QUALIFIER genType ln_two() { - return T(0.693147180559945309417232121458176568); + return genType(0.693147180559945309417232121458176568); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T ln_ten() + template + GLM_FUNC_QUALIFIER genType ln_ten() { - return T(2.30258509299404568401799145468436421); + return genType(2.30258509299404568401799145468436421); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T ln_ln_two() + template + GLM_FUNC_QUALIFIER genType ln_ln_two() { - return T(-0.3665129205816643); + return genType(-0.3665129205816643); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T third() + template + GLM_FUNC_QUALIFIER genType third() { - return T(0.3333333333333333333333333333333333333333); + return genType(0.3333333333333333333333333333333333333333); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T two_thirds() + template + GLM_FUNC_QUALIFIER genType two_thirds() { - return T(0.666666666666666666666666666666666666667); + return genType(0.666666666666666666666666666666666666667); } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR T golden_ratio() + template + GLM_FUNC_QUALIFIER genType golden_ratio() { - return T(1.61803398874989484820458683436563811); + return genType(1.61803398874989484820458683436563811); } } //namespace glm