diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-10-15 14:22:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-10-15 14:22:11 +0100 |
| commit | 573d38b0d1122597a73be47401e8b908429b9fe4 (patch) | |
| tree | 5b6aeaae9f7928aa8b8aee5ae8b1c75bf391815f /src | |
| parent | 647a861e1fd65f6ddb30fda353cd1b4bbb334dc1 (diff) | |
Add ratio() method.
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -54,6 +54,10 @@ struct Size { : width (w) , height (h) {} + + float ratio () const { + return float (width) / height; + } int width; int height; |
