Skip to main content

ratio_to_percent

Function ratio_to_percent 

Source
pub fn ratio_to_percent(ratio: f32) -> f32
Expand description

Converts a fraction in 0.0..=1.0 to a percentage.

§Arguments

  • ratio - a fraction, where 1.0 is the whole.

§Returns

The equivalent percentage, ratio * 100.