mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
Fixed error: comparing floating point with == or != is unsafe
This commit is contained in:
parent
2e3fc5da83
commit
8e8d046587
@ -57,17 +57,17 @@ namespace fmax_
|
||||
|
||||
glm::vec2 B0 = glm::fmax(glm::vec2(1), glm::vec2(1));
|
||||
glm::vec2 B1 = glm::fmax(glm::vec2(1), 1.0f);
|
||||
bool B2 = glm::all(glm::equal(B0, B1));
|
||||
bool B2 = glm::all(glm::equal(B0, B1, glm::epsilon<float>()));
|
||||
Error += B2 ? 0 : 1;
|
||||
|
||||
glm::vec3 C0 = glm::fmax(glm::vec3(1), glm::vec3(1));
|
||||
glm::vec3 C1 = glm::fmax(glm::vec3(1), 1.0f);
|
||||
bool C2 = glm::all(glm::equal(C0, C1));
|
||||
bool C2 = glm::all(glm::equal(C0, C1, glm::epsilon<float>()));
|
||||
Error += C2 ? 0 : 1;
|
||||
|
||||
glm::vec4 D0 = glm::fmax(glm::vec4(1), glm::vec4(1));
|
||||
glm::vec4 D1 = glm::fmax(glm::vec4(1), 1.0f);
|
||||
bool D2 = glm::all(glm::equal(D0, D1));
|
||||
bool D2 = glm::all(glm::equal(D0, D1, glm::epsilon<float>()));
|
||||
Error += D2 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
Loading…
Reference in New Issue
Block a user