mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-14 12:42:19 -04:00
Remove a lot of static_cast<>s involving UI structs.
Also starting to get religion on using unsigned integers only when I want their wrapping/modulus behavior.
This commit is contained in:
parent
4c8550bb7d
commit
3f94591083
11 changed files with 28 additions and 76 deletions
|
@ -73,10 +73,7 @@ ui::Point Calibration::translate(const DigitizerPoint& p) const {
|
|||
const int32_t y = (d * p.x + e * p.y + f) / k;
|
||||
const auto x_clipped = x_range.clip(x);
|
||||
const auto y_clipped = y_range.clip(y);
|
||||
return {
|
||||
static_cast<ui::Coord>(x_clipped),
|
||||
static_cast<ui::Coord>(y_clipped)
|
||||
};
|
||||
return { x_clipped, y_clipped };
|
||||
}
|
||||
|
||||
const Calibration default_calibration() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue