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
5ecc27ff93
commit
a7e0e8387b
@ -10,8 +10,8 @@ static int test_vec1_operators()
|
|||||||
{
|
{
|
||||||
int Error(0);
|
int Error(0);
|
||||||
|
|
||||||
glm::vec1 A(1.0f);
|
glm::ivec1 A(1.0f);
|
||||||
glm::vec1 B(1.0f);
|
glm::ivec1 B(1.0f);
|
||||||
{
|
{
|
||||||
bool R = A != B;
|
bool R = A != B;
|
||||||
bool S = A == B;
|
bool S = A == B;
|
||||||
@ -20,10 +20,10 @@ static int test_vec1_operators()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
A *= 1.0f;
|
A *= 1;
|
||||||
B *= 1.0;
|
B *= 1;
|
||||||
A += 1.0f;
|
A += 1;
|
||||||
B += 1.0;
|
B += 1;
|
||||||
|
|
||||||
bool R = A != B;
|
bool R = A != B;
|
||||||
bool S = A == B;
|
bool S = A == B;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include <glm/gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
#include <glm/gtc/vec1.hpp>
|
#include <glm/gtc/vec1.hpp>
|
||||||
|
#include <glm/gtc/constants.hpp>
|
||||||
|
#include <glm/ext/vector_relational.hpp>
|
||||||
|
|
||||||
int test_value_ptr_vec()
|
int test_value_ptr_vec()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user