Skip to main content

clamp_to_min_height

Function clamp_to_min_height 

Source
fn clamp_to_min_height(
    mode: ResizeMode,
    orig: Rect,
    min_height: f32,
    delta: Vec2,
) -> Vec2
Expand description

Clamp the y-component of a resize delta so the block cannot shrink below min_height. Which edge moves (and therefore the sign of the constraint) depends on the resize mode.