summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 4f590198..2f661d77 100644
--- a/src/util.h
+++ b/src/util.h
@@ -54,6 +54,10 @@ struct Size {
: width (w)
, height (h)
{}
+
+ float ratio () const {
+ return float (width) / height;
+ }
int width;
int height;