Add ratio() method.
[libdcp.git] / src / util.h
index 4f5901980739c4461e6f32f1165a0c81cae27b84..2f661d772b3457514c80da6416aaf69ca43d18da 100644 (file)
@@ -54,6 +54,10 @@ struct Size {
                : width (w)
                , height (h)
        {}
+
+       float ratio () const {
+               return float (width) / height;
+       }
        
        int width;
        int height;