pub fn multiply_factorial<T>(fact1: T, fact2: T) -> T where
    T: PrimInt + Unsigned + Product
Expand description

Calculate two factorial multiply on each other. It’ll try to reduce calculation time by calculate the common value only once.

Examples

use permutator::multiply_factorial;
// 5! * 4!
multiply_factorial(5u32, 4u32); // calculate 4! and power it by 2 then multiply by 5.
multiply_factorial(4u32, 5u32); // perform similar to above step.
multiply_factorial(5u128, 5u128); // calculate 5! and power it by 2.