Fixed warnings

This commit is contained in:
Christophe Riccio
2017-08-08 20:28:37 +02:00
parent 32054a8fdf
commit 5a747d2ae5
7 changed files with 31 additions and 31 deletions

View File

@@ -206,8 +206,8 @@ namespace uround
for(float f = 0.0f; f < 3.1f; f += 0.05f)
{
int RoundFast = glm::uround(f);
int RoundSTD = glm::round(f);
int RoundFast = static_cast<int>(glm::uround(f));
int RoundSTD = static_cast<int>(glm::round(f));
Error += RoundFast == RoundSTD ? 0 : 1;
assert(!Error);
}

View File

@@ -134,7 +134,7 @@ int test_quat_slerp()
float const Epsilon = 0.0001f;//glm::epsilon<float>();
float sqrt2 = sqrt(2.0f)/2.0f;
float sqrt2 = std::sqrt(2.0f)/2.0f;
glm::quat id(static_cast<float>(1), static_cast<float>(0), static_cast<float>(0), static_cast<float>(0));
glm::quat Y90rot(sqrt2, 0.0f, sqrt2, 0.0f);
glm::quat Y180rot(0.0f, 0.0f, 1.0f, 0.0f);

View File

@@ -8,9 +8,9 @@ int test_ulp_float_dist()
float A = 1.0f;
float B = glm::next_float(A);
Error += A != B ? 0 : 1;
Error += glm::epsilonNotEqual(A, B, glm::epsilon<float>()) ? 0 : 1;
float C = glm::prev_float(B);
Error += A == C ? 0 : 1;
Error += glm::epsilonEqual(A, C, glm::epsilon<float>()) ? 0 : 1;
int D = glm::float_distance(A, B);
Error += D == 1 ? 0 : 1;