diff --git a/src/Magnum.h b/src/Magnum.h index b4af2f8a3..7123b40f7 100644 --- a/src/Magnum.h +++ b/src/Magnum.h @@ -66,7 +66,11 @@ namespace Math { template constexpr T deg(T value); template constexpr T rad(T value); - template struct Constants; + template class Constants; + + namespace Geometry { + template class Rectangle; + } } /* Bring debugging facility from Corrade::Utility namespace */ @@ -117,6 +121,12 @@ typedef Math::Matrix4 Matrix4; /* Using float instead of GLfloat to not break KDevelop autocompletion */ typedef Math::Constants Constants; +/** @brief Floating-point rectangle */ +typedef Math::Geometry::Rectangle Rectangle; + +/** @brief Integer rectangle */ +typedef Math::Geometry::Rectangle Rectanglei; + /* Copying angle converters from Math namespace */ using Math::deg; using Math::rad; diff --git a/src/Math/Geometry/Rectangle.h b/src/Math/Geometry/Rectangle.h index f8eac6511..a8bda2d1c 100644 --- a/src/Math/Geometry/Rectangle.h +++ b/src/Math/Geometry/Rectangle.h @@ -29,6 +29,7 @@ namespace Magnum { namespace Math { namespace Geometry { Helper class for storing axis-aligned rectangles consisting of bottom left and top right corner positions. Bottom left position is inclusive, while top right position is exclusive. +@see Magnum::Rectanglei */ template class Rectangle { public: