Parcourir la source

Added numeric min/max for type.

Бранимир Караџић il y a 3 ans
Parent
commit
31358177f1
1 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 8 8
      src/image_cubemap_filter.cpp

+ 8 - 8
src/image_cubemap_filter.cpp

@@ -430,10 +430,10 @@ namespace bimg
 	{
 	{
 		Aabb()
 		Aabb()
 		{
 		{
-			m_min[0] =  bx::kFloatMax;
-			m_min[1] =  bx::kFloatMax;
-			m_max[0] = -bx::kFloatMax;
-			m_max[1] = -bx::kFloatMax;
+			m_min[0] = bx::max<float>();
+			m_min[1] = bx::max<float>();
+			m_max[0] = bx::min<float>();
+			m_max[1] = bx::min<float>();
 		}
 		}
 
 
 		void add(float _x, float _y)
 		void add(float _x, float _y)
@@ -455,10 +455,10 @@ namespace bimg
 		bool isEmpty() const
 		bool isEmpty() const
 		{
 		{
 			// Has to have at least two points added so that no value is equal to initial state.
 			// Has to have at least two points added so that no value is equal to initial state.
-			return ( (m_min[0] ==  bx::kFloatMax)
-				||   (m_min[1] ==  bx::kFloatMax)
-				||   (m_max[0] == -bx::kFloatMax)
-				||   (m_max[1] == -bx::kFloatMax)
+			return ( (m_min[0] == bx::max<float>() )
+				||   (m_min[1] == bx::max<float>() )
+				||   (m_max[0] == bx::min<float>() )
+				||   (m_max[1] == bx::min<float>() )
 				);
 				);
 		}
 		}