summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/rectangle.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/rectangle.rs b/core/src/rectangle.rs
index 87046df4..e8d0538a 100644
--- a/core/src/rectangle.rs
+++ b/core/src/rectangle.rs
@@ -135,8 +135,8 @@ impl From<Rectangle<f32>> for Rectangle<u32> {
Rectangle {
x: rectangle.x as u32,
y: rectangle.y as u32,
- width: rectangle.width.ceil() as u32,
- height: rectangle.height.ceil() as u32,
+ width: (rectangle.width + 0.5).round() as u32,
+ height: (rectangle.height + 0.5).round() as u32,
}
}
}