From: Ian Jackson Date: Tue, 12 Jan 2021 19:19:31 +0000 (+0000) Subject: Fix bbox for Square (!) X-Git-Tag: otter-0.3.0~65 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d6567ddf81df33e8513469b950a5a30364b43011;p=otter.git Fix bbox for Square (!) Signed-off-by: Ian Jackson --- diff --git a/src/shapelib.rs b/src/shapelib.rs index c1620a43..71ab4f3d 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -589,7 +589,7 @@ impl Outline for Square { Some((smallest * 0.5) as Coord) } fn bbox_approx(&self) -> [Pos;2] { - let pos : Pos = (self.xy * 0.5).map( + let pos : Pos = self.xy.map( |v| ((v * 0.5).ceil()) as Coord ); let neg = -pos;