chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f512d64
)
Fix bbox for Square (!)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 12 Jan 2021 19:19:31 +0000
(19:19 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 12 Jan 2021 20:18:59 +0000
(20:18 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/shapelib.rs
patch
|
blob
|
history
diff --git
a/src/shapelib.rs
b/src/shapelib.rs
index c1620a43da67fa9f74d519b0a148c47d85216e6f..71ab4f3d87bad2d41c7695a93a1b0948ab1da44c 100644
(file)
--- 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;