From e8020f3eaf3baec2b41847f6250d8554136e8d89 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 4 Feb 2025 20:58:06 +0100 Subject: Add `Copy` action to code blocks in `markdown` example --- core/src/pixels.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/src') 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 for Pixels { Pixels(self.0 / rhs) } } + +impl std::ops::Div for Pixels { + type Output = Pixels; + + fn div(self, rhs: u32) -> Self { + Pixels(self.0 / rhs as f32) + } +} -- cgit