Skip to main content

clamp

Function clamp 

Source
pub fn clamp<S>(value: S, min_val: S, max_val: S) -> S
where S: Clamp,
Expand description

Clamp function in a component way

Clamps self between min_val and max_val (inclusive)

Can cause a panic for grid if the size mismatch