mirror of
https://github.com/g-truc/glm.git
synced 2024-11-16 14:54:35 +00:00
Fix potential infinite loop in float_distance().
This commit is contained in:
parent
40398d67cd
commit
85993759b5
@ -287,7 +287,7 @@ namespace glm
|
|||||||
if(x < y)
|
if(x < y)
|
||||||
{
|
{
|
||||||
T temp = x;
|
T temp = x;
|
||||||
while(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())
|
while(temp < y)// && ulp < std::numeric_limits<std::size_t>::max())
|
||||||
{
|
{
|
||||||
++ulp;
|
++ulp;
|
||||||
temp = next_float(temp);
|
temp = next_float(temp);
|
||||||
@ -296,7 +296,7 @@ namespace glm
|
|||||||
else if(y < x)
|
else if(y < x)
|
||||||
{
|
{
|
||||||
T temp = y;
|
T temp = y;
|
||||||
while(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())
|
while(temp < x)// && ulp < std::numeric_limits<std::size_t>::max())
|
||||||
{
|
{
|
||||||
++ulp;
|
++ulp;
|
||||||
temp = next_float(temp);
|
temp = next_float(temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user