Function scale_to_fit

Source
fn scale_to_fit(
    image_size: Vec2,
    available_size: Vec2,
    maintain_aspect_ratio: bool,
) -> Vec2