This repository has been archived on 2026-05-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
VulkanExample/dep/include/glm/ext/scalar_constants.inl
2026-04-21 05:29:07 +09:00

25 lines
792 B
C++

#include <limits>
namespace glm
{
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon()
{
static_assert(std::numeric_limits<genType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'epsilon' only accepts floating-point inputs");
return std::numeric_limits<genType>::epsilon();
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi()
{
static_assert(std::numeric_limits<genType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'pi' only accepts floating-point inputs");
return static_cast<genType>(3.14159265358979323846264338327950288);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two()
{
return genType(0.877582561890372716130286068203503191);
}
} //namespace glm