pub fn snap_point_to_physical(p: Point, scale: Scale) -> (i32, i32)Expand description
Snaps both coordinates of a logical point to physical integer pixels.
ยงExamples
use ailloli_ui_core::{Point, Scale};
use ailloli_ui_core::math::snap_point_to_physical;
assert_eq!(snap_point_to_physical(Point::new(1.25, 2.0), Scale::new(2.0)), (3, 4));