summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/pixels.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/pixels.rs b/core/src/pixels.rs
index a1ea0f15..7d6267cf 100644
--- a/core/src/pixels.rs
+++ b/core/src/pixels.rs
@@ -79,3 +79,11 @@ impl std::ops::Div<f32> for Pixels {
Pixels(self.0 / rhs)
}
}
+
+impl std::ops::Div<u32> for Pixels {
+ type Output = Pixels;
+
+ fn div(self, rhs: u32) -> Self {
+ Pixels(self.0 / rhs as f32)
+ }
+}