Skip to main content

snap_rect

Function snap_rect 

pub fn snap_rect(moving: Rect, targets: &[Rect], tolerance: f64) -> Snap
Expand description

Snap a box being moved onto targets’ edges and centres, each axis on its own, within tolerance units.