summaryrefslogtreecommitdiff
path: root/src/geom
diff options
context:
space:
mode:
Diffstat (limited to 'src/geom')
-rw-r--r--src/geom/ratio.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/geom/ratio.rs b/src/geom/ratio.rs
index 5490bcba..fe87dd6c 100644
--- a/src/geom/ratio.rs
+++ b/src/geom/ratio.rs
@@ -110,6 +110,14 @@ impl Div<f64> for Ratio {
}
}
+impl Div<Ratio> for f64 {
+ type Output = Self;
+
+ fn div(self, other: Ratio) -> Self {
+ self / other.get()
+ }
+}
+
impl Div for Ratio {
type Output = f64;