Multifactorials
is a powerful mathematics tool who allows you to calculate factorials easily.
To use multifactorials
, you need to add it to your dependencies like in the example bellow:
```toml [package] name = "my_crate" version = "0.1.0"
[dependencies]
multifactorials = "0.2.0"
``
*Replace
0.2.0with the latest version of
mutlifactorials`.*
```rust use multifactorials::Multifactorials;
fn main() {
let factorial = Multifactorial::from(18, 2);
}
```
This example executes the 18!!
operation, and you can add the number of exclamation mark you want.
```rust use multifactorials::Multifactorials;
fn main() {
let factorial = Multifactorial::from(7, 1);
}
```
This example returns the result of 7!
.