diff --git a/glm/gtc/constants.hpp b/glm/gtc/constants.hpp index 99f21286..5dececb9 100644 --- a/glm/gtc/constants.hpp +++ b/glm/gtc/constants.hpp @@ -39,6 +39,11 @@ namespace glm template GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi(); + /// Return unit-circle circumference, or pi * 2. + /// @see gtc_constants + template + GLM_FUNC_DECL GLM_CONSTEXPR genType tau() { return glm::two_pi(); } + /// Return square root of pi. /// @see gtc_constants template diff --git a/glm/gtc/constants.inl b/glm/gtc/constants.inl index bb98c6bf..e9d37761 100644 --- a/glm/gtc/constants.inl +++ b/glm/gtc/constants.inl @@ -20,6 +20,12 @@ namespace glm return genType(6.28318530717958647692528676655900576); } + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType tau() + { + return two_pi(); + } + template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_pi() {