Provides a trait for numeric types to perform combined multiplication and division with overflow protection.
MulDiv trait provides functions for performing combined multiplication and division for
numeric types and comes with implementations for all the primitive integer types. Three
variants with different rounding characteristics are provided:
extern crate muldiv; use muldiv::MulDiv; // Calculates 127 * 23 / 42 rounded down let x = 127u8.mul_div_floor(23, 42); assert_eq!(x, Some(69));
Trait for calculating