plumageRender/external/glm/test/gtc/gtc_constants.cpp

31 lines
447 B
C++
Raw Normal View History

2023-05-17 14:49:05 +08:00
#include <glm/gtc/constants.hpp>
int test_epsilon()
{
2023-06-07 10:52:04 +08:00
int Error = 0;
2023-05-17 14:49:05 +08:00
{
float Test = glm::epsilon<float>();
2023-06-07 10:52:04 +08:00
Error += Test > 0.0f ? 0 : 1;
2023-05-17 14:49:05 +08:00
}
{
double Test = glm::epsilon<double>();
2023-06-07 10:52:04 +08:00
Error += Test > 0.0 ? 0 : 1;
2023-05-17 14:49:05 +08:00
}
return Error;
}
int main()
{
int Error(0);
//float MinHalf = 0.0f;
//while (glm::half(MinHalf) == glm::half(0.0f))
// MinHalf += std::numeric_limits<float>::epsilon();
Error += test_epsilon();
return Error;
}