projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
647a861
)
Add ratio() method.
author
Carl Hetherington
<cth@carlh.net>
Tue, 15 Oct 2013 13:22:11 +0000
(14:22 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 15 Oct 2013 13:22:11 +0000
(14:22 +0100)
src/util.h
patch
|
blob
|
history
diff --git
a/src/util.h
b/src/util.h
index 4f5901980739c4461e6f32f1165a0c81cae27b84..2f661d772b3457514c80da6416aaf69ca43d18da 100644
(file)
--- 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;