Function num_integer::multiply_and_divide

source ยท
pub(crate) fn multiply_and_divide<T: Integer + Clone>(r: T, a: T, b: T) -> T
Expand description

Calculate r * a / b, avoiding overflows and fractions.

Assumes that b divides r * a evenly.