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:
a92be7f
)
dice: Fix a radius/diameter confusion
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 19:06:49 +0000
(20:06 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 21:43:43 +0000
(22:43 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/dice.rs
patch
|
blob
|
history
diff --git
a/src/dice.rs
b/src/dice.rs
index f5b92e6a6f0d4a496d5f33a1e54352ac4a262bfd..4f8b6a50fd242441c8927daa688cbda23460e817 100644
(file)
--- a/
src/dice.rs
+++ b/
src/dice.rs
@@
-135,7
+135,7
@@
impl PieceSpec for Spec {
else throw!(SpecError::MultipleFacesRequired) };
let radius = if (0.5 .. 1.5).contains(&self.circle_scale) {
- image.bbox_approx()?.size()?.len()? * self.circle_scale
+ image.bbox_approx()?.size()?.len()? *
0.5 *
self.circle_scale
} else {
throw!(SpecError::InvalidSizeScale)
};