num_integer

Function 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.