diff options
Diffstat (limited to 'src/Util.cc')
| -rw-r--r-- | src/Util.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Util.cc b/src/Util.cc index bc685bfa..9dadb3e1 100644 --- a/src/Util.cc +++ b/src/Util.cc @@ -141,6 +141,12 @@ bool Rect::intersects(const Rect &a) const { } +bool Rect::contains(int __x, int __y) const { + return __x >= _x1 && __x <= _x2 && + __y >= _y1 && __y <= _y2; +} + + string expandTilde(const string& s) { if (s[0] != '~') return s; |
