lml-main
Version:
This is now a mono repository published into many standalone packages.
45 lines (28 loc) • 894 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Compute the number of ways of obtaining an ordered subset of `k` elements
from a set of `n` elements.
Permutations only takes integer arguments.
The following condition must be enforced: k <= n.
```js
math.permutations(n)
math.permutations(n, k)
```
Parameter | Type | Description
--------- | ---- | -----------
`n` | number &
`k` | number &
Type | Description
---- | -----------
number &
```js
math.permutations(5); // 120
math.permutations(5, 3); // 60
```
[](combinations.md),
[](factorial.md)