Common/Rectangle: Make it work with float types

This commit is contained in:
Connor McLaughlin 2020-09-13 00:04:57 +10:00
parent 2b4568df6a
commit 84b0522abc
1 changed files with 2 additions and 5 deletions

View File

@ -10,11 +10,8 @@ namespace Common {
template<typename T>
struct Rectangle
{
enum : T
{
InvalidMinCoord = std::numeric_limits<T>::max(),
InvalidMaxCoord = std::numeric_limits<T>::min()
};
static constexpr T InvalidMinCoord = std::numeric_limits<T>::max();
static constexpr T InvalidMaxCoord = std::numeric_limits<T>::min();
/// Default constructor - initializes to an invalid coordinate range suitable for including points.
constexpr Rectangle() : left(InvalidMinCoord), top(InvalidMinCoord), right(InvalidMaxCoord), bottom(InvalidMaxCoord)