aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/rectangle.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp
index abe26ef1..2131afc8 100644
--- a/src/utils/rectangle.hpp
+++ b/src/utils/rectangle.hpp
@@ -63,6 +63,12 @@ namespace usdx
{
}
+ Rectangle(const T rectangle[]) :
+ point1(rectangle[0], rectangle[1]),
+ point2(rectangle[0] + rectangle[2], rectangle[1] + rectangle[3])
+ {
+ }
+
Rectangle(const Rectangle<T>& rectangle) :
point1(rectangle.point1), point2(rectangle.point2)
{