ailloli_ui_core/math/mod.rs
1//! DPI scaling and snapping between logical and physical pixels.
2
3/// Device-pixel ratios and logical-to-physical snapping helpers.
4///
5/// # Examples
6///
7/// ```
8/// use ailloli_ui_core::math::scale::{to_physical_f32, Scale};
9/// assert_eq!(to_physical_f32(2.0, Scale::new(2.0)), 4.0);
10/// ```
11pub mod scale;
12
13pub use scale::{
14 snap_f32_to_physical_px, snap_point_to_physical, snap_rect_to_physical, snap_size_to_physical,
15 to_logical_f32, to_physical_f32, PhysicalRectI32, Scale,
16};