Skip to content

Commit

Permalink
Added Rectf::grown(float border) method
Browse files Browse the repository at this point in the history
  • Loading branch information
Grumbel committed Aug 25, 2014
1 parent 2ff948b commit f98f624
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/math/rectf.hpp
Expand Up @@ -129,6 +129,12 @@ class Rectf
return ((v1 - v2).norm ());
}

Rectf grown(float border) const
{
return Rectf(p1.x - border, p1.y - border,
p2.x + border, p2.y + border);
}

// leave these two public to save the headaches of set/get functions for such
// simple things :)

Expand Down

0 comments on commit f98f624

Please sign in to comment.