Skip to main content

clamp_to_widest

Function clamp_to_widest 

Source
fn clamp_to_widest(
    mode: ResizeMode,
    orig: Rect,
    widest: WorldPx,
    delta: Vec2,
) -> Vec2
Expand description

Clamp the x-component of a resize delta so the shape cannot grow wider than widest, never forcing a shape already wider to shrink.