Function div_to_factor

Source
pub fn div_to_factor<T, const DECIMALS: u8>(
    value: &T,
    divisor: &T,
    round_up_magnitude: bool,
) -> Option<T>
where T: FixedPointOps<DECIMALS>,
Expand description

Convert the value to a factor after dividing by the divisor.

ยงNotes

  • Return zero if the divisor is zero.