pub fn fit_within(source: [u32; 2], bounds: [u32; 2]) -> [u32; 2]
fit_within scales source down to fit bounds, keeping its aspect ratio and never returning a zero side. A source that already fits is returned unchanged.
fit_within
source
bounds