X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Frectangle.h;h=cbf625c913a04be0cc894d3f7d9732dbfa0bdcb5;hb=adb812a194961d542dcb0abd61258cbc8723ecd9;hp=296ba6c936c959dcb94bb0174b2a1457bd23b562;hpb=6ff13022b53830d35283905d562c2ef3af198cc1;p=libs%2Fmath.git diff --git a/source/geometry/rectangle.h b/source/geometry/rectangle.h index 296ba6c..cbf625c 100644 --- a/source/geometry/rectangle.h +++ b/source/geometry/rectangle.h @@ -1,19 +1,23 @@ #ifndef MSP_GEOMETRY_RECTANGLE_H_ #define MSP_GEOMETRY_RECTANGLE_H_ -#include #include "hyperbox.h" namespace Msp { namespace Geometry { +/** +The two-dimensional special case of a HyperBox. This class exists for +convenience only and does not provide any extra functionality over the base +class. +*/ template class Rectangle: public HyperBox { public: Rectangle() { } explicit Rectangle(const LinAl::Vector &d): HyperBox(d) { } - Rectangle(T w, T h): HyperBox(LinAl::Vector2(w, h)) { } + Rectangle(T w, T h): HyperBox(LinAl::Vector(w, h)) { } T get_width() const { return this->get_dimension(0); } T get_height() const { return this->get_dimension(1); }