*
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#ifndef Rectangle2D_h__
|
||||
#define Rectangle2D_h__
|
||||
|
||||
namespace LifeGraphics
|
||||
{
|
||||
class Rectangle2D
|
||||
{
|
||||
public:
|
||||
float minX;
|
||||
float minY;
|
||||
float maxX;
|
||||
float maxY;
|
||||
|
||||
Rectangle2D(float _minX, float _minY, float _maxX, float _maxY)
|
||||
{
|
||||
minX = _minX;
|
||||
maxX = _maxX;
|
||||
minY = _minY;
|
||||
maxY = _maxY;
|
||||
}
|
||||
const float width() const
|
||||
{
|
||||
return maxX - minX;
|
||||
}
|
||||
const float height() const
|
||||
{
|
||||
return maxY - minY;
|
||||
}
|
||||
Rectangle2D()
|
||||
{
|
||||
minX = 0.0f;
|
||||
maxX = 0.0f;
|
||||
minY = 0.0f;
|
||||
maxY = 0.0f;
|
||||
}
|
||||
~Rectangle2D()
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif // Rectangle2D_h__
|
||||
Reference in New Issue
Block a user