Skip to content

Commit

Permalink
libdeng2|Rectangle: Added utility method for making an (x,y,w,h) vector
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 6, 2014
1 parent 0c86709 commit 123e463
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/libdeng2/include/de/core/rectangle.h
Expand Up @@ -187,6 +187,9 @@ class Rectangle
Corner middle() const {
return Corner((topLeft.x + bottomRight.x)/2.0, (topLeft.y + bottomRight.y)/2.0);
}
Vector4<Type> xywh() const {
return Vector4<Type>(topLeft.x, topLeft.y, Type(width()), Type(height()));
}

public:
Corner topLeft;
Expand Down

0 comments on commit 123e463

Please sign in to comment.