README
Math
Math with superpowers! 💪
This data structure inherit all methods and properties from the
Math
built-in.
Individual Module Installation
Yarn
$ yarn add @clarketm/supermath
Npm
$ npm install @clarketm/supermath --save
API
factorial(num: number): number
Factorial
Name | Type | Attribute | Description |
---|---|---|---|
num | number | integral number |
gcd(numA: number, numB: number): number
Greatest common divisor
Name | Type | Attribute | Description |
---|---|---|---|
numA | number | integral number | |
numB | number | integral number |
lcm(numA: number, numB: number): number
Least common multiple
Name | Type | Attribute | Description |
---|---|---|---|
numA | number | integral number | |
numB | number | integral number |
randrange(start: number, stop: number): number
Random number
Name | Type | Attribute | Description |
---|---|---|---|
start | number | starting number (inclusive) | |
stop | number | stopping number (exclusive) |