Added std::round test
This commit is contained in:
parent
d37d3539ed
commit
4707333a58
@ -26,7 +26,7 @@
|
|||||||
/// @author Christophe Riccio
|
/// @author Christophe Riccio
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "./core/_vectorize.hpp"
|
#include "_vectorize.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <glm/gtc/constants.hpp>
|
#include <glm/gtc/constants.hpp>
|
||||||
#include <glm/gtc/epsilon.hpp>
|
#include <glm/gtc/epsilon.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
int test_modf()
|
int test_modf()
|
||||||
{
|
{
|
||||||
@ -338,6 +339,23 @@ int test_round()
|
|||||||
Error += F == 2.0f ? 0 : 1;
|
Error += F == 2.0f ? 0 : 1;
|
||||||
float G = glm::round(1.9f);
|
float G = glm::round(1.9f);
|
||||||
Error += G == 2.0f ? 0 : 1;
|
Error += G == 2.0f ? 0 : 1;
|
||||||
|
|
||||||
|
#if GLM_LANG >= GLM_LANG_CXX11
|
||||||
|
float A1 = std::round(0.0f);
|
||||||
|
Error += A1 == A ? 0 : 1;
|
||||||
|
float B1 = std::round(0.5f);
|
||||||
|
Error += B1 == B ? 0 : 1;
|
||||||
|
float C1 = std::round(1.0f);
|
||||||
|
Error += C1 == C ? 0 : 1;
|
||||||
|
float D1 = std::round(0.1f);
|
||||||
|
Error += D1 == D ? 0 : 1;
|
||||||
|
float E1 = std::round(0.9f);
|
||||||
|
Error += E1 == E ? 0 : 1;
|
||||||
|
float F1 = std::round(1.5f);
|
||||||
|
Error += F == F ? 0 : 1;
|
||||||
|
float G1 = std::round(1.9f);
|
||||||
|
Error += G1 == G ? 0 : 1;
|
||||||
|
#endif // GLM_LANG >= GLM_CXX0X
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user