mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
Fixed error: comparing floating point with == or != is unsafe
This commit is contained in:
parent
633ca9a2f0
commit
f9dc1d587f
@ -24,8 +24,8 @@ static int test_operators()
|
||||
glm::mat2x3 o = m / x;
|
||||
glm::mat2x3 p = x * m;
|
||||
glm::mat2x3 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ static int test_operators()
|
||||
glm::mat2x4 o = m / x;
|
||||
glm::mat2x4 p = x * m;
|
||||
glm::mat2x4 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ static bool test_operators()
|
||||
glm::mat3x2 o = m / x;
|
||||
glm::mat3x2 p = x * m;
|
||||
glm::mat3x2 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -51,8 +51,8 @@ static int test_operators()
|
||||
glm::mat3x3 o = m / x;
|
||||
glm::mat3x3 p = x * m;
|
||||
glm::mat3x3 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ static bool test_operators()
|
||||
glm::mat3x4 o = m / x;
|
||||
glm::mat3x4 p = x * m;
|
||||
glm::mat3x4 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ static int test_operators()
|
||||
glm::mat4x2 o = m / x;
|
||||
glm::mat4x2 p = x * m;
|
||||
glm::mat4x2 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ static int test_operators()
|
||||
glm::mat4x3 o = m / x;
|
||||
glm::mat4x3 p = x * m;
|
||||
glm::mat4x3 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ static bool test_operators()
|
||||
glm::mat4x4 o = m / x;
|
||||
glm::mat4x4 p = x * m;
|
||||
glm::mat4x4 q = m * x;
|
||||
bool R = m != q;
|
||||
bool S = m == l;
|
||||
bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
|
||||
bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
|
||||
|
||||
return (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user