This is causing things not to fit into hands. I don't think this
rounding up is actually necessary; it was just an abundance of
caution.
This deals with a todo.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
// SPDX-License-Identifier: AGPL-3.0-or-later
// There is NO WARRANTY.
-// xxx layout in actual mao resorts to Hanging (in eg mao.game.toml)
// xxx mao needs updating so Hang is non-awful
use crate::prelude::*;
}
#[throws(IE)]
fn bbox_approx(&self) -> Rect {
- let d = (self.diam * 0.5).ceil() as Coord;
+ let d = (self.diam * 0.5).round() as Coord;
Rect{ corners: [PosC::new(-d,-d), PosC::new(d, d)]}
}
}
#[throws(IE)]
fn bbox_approx(&self) -> Rect {
let pos: Pos = self.xy.map(
- |v| ((v * 0.5).ceil()) as Coord
+ |v| ((v * 0.5).round()) as Coord
);
let neg = (-pos)?;
Rect{ corners: [ neg, pos ] }