box2: fix bug in SetMaximum()

When setting the maximum represented box, std::numerical_limits::min
returns the most negative number only for integers.  For floating point,
it returns the smallest positive number.  std::numerical_limits::lowest
is the same as min for integers but returns the most negative number for
floating point as well.
This commit is contained in:
Seth Hillbrand 2018-06-20 20:21:03 -07:00
parent a1ef441dd9
commit a552b4ccca
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ public:
void SetMaximum()
{
m_Pos.x = m_Pos.y = coord_limits::min() / 2 + coord_limits::epsilon();
m_Pos.x = m_Pos.y = coord_limits::lowest() / 2 + coord_limits::epsilon();
m_Size.x = m_Size.y = coord_limits::max() - coord_limits::epsilon();
}