[−][src]Function permutator::divide_factorial
pub fn divide_factorial<T>(numerator: T, denominator: T) -> T where
T: PrimInt + Unsigned + Product,
Calculate factorial for two factorial division. It'll return 1 if numerator is smaller or equals to denominator. Otherwise, it'll short circuit the calculation by calculate only the undivided remainder.
Examples
use permutator::divide_factorial; // calculate 5!/3! divide_factorial(5u8, 3u8); // return 5 * 4 = 20 // calculate 3!/5! divide_factorial(3u32, 5u32); // return 1. // calculate 5!/5! divide_factorial(5u16, 5u16); // return 1.