Skip to main content

fit_to_aspect

Function fit_to_aspect 

Source
pub fn fit_to_aspect(available: Vec2, aspect: f32) -> Vec2
Expand description

Returns the largest size that fits available and keeps aspect.

The aspect is width over height.