Add tau constant ##1153

master
christophe ago%!(EXTRA string=1 year) committed by Christophe
parent 08f2fd1099
commit 85f2e6b998
  1. 5
      glm/gtc/constants.hpp
  2. 6
      glm/gtc/constants.inl

@ -39,6 +39,11 @@ namespace glm
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi();
/// Return unit-circle circumference, or pi * 2.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR genType tau() { return glm::two_pi<genType>(); }
/// Return square root of pi.
/// @see gtc_constants
template<typename genType>

@ -20,6 +20,12 @@ namespace glm
return genType(6.28318530717958647692528676655900576);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType tau()
{
return two_pi<genType>();
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_pi()
{

Loading…
Cancel
Save