mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
Fixed error: comparing floating point with == or != is unsafe
This commit is contained in:
parent
b2ba0c317d
commit
ef955b2bf5
@ -112,8 +112,8 @@ int test_vec4_ctor()
|
||||
# endif//GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
|
||||
|
||||
{
|
||||
glm::vec4 A(1);
|
||||
glm::vec4 B(1, 1, 1, 1);
|
||||
glm::ivec4 A(1);
|
||||
glm::ivec4 B(1, 1, 1, 1);
|
||||
|
||||
Error += A == B ? 0 : 1;
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ static int test_operators()
|
||||
int Error = 0;
|
||||
|
||||
{
|
||||
glm::vec2 A(1.0f);
|
||||
glm::vec2 B(1.0f);
|
||||
glm::ivec2 A(1.0f);
|
||||
glm::ivec2 B(1.0f);
|
||||
Error += A != B ? 1 : 0;
|
||||
Error += A == B ? 0 : 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user