summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 82aaf8ff5..c3dd13d7c 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -613,3 +613,10 @@ Rectangle::intersection (Rectangle const & other) const
min (y + h, other.y + other.h) - ty
);
}
+
+int
+round_up (int a, int t)
+{
+ a += (t - 1);
+ return a - (a % t);
+}