@knutkirkhorn/gcd
v2.0.0
Published
Get the greatest common devisor of two numbers
Maintainers
Readme
gcd
Get the greatest common devisor of two numbers
Installation
npm install @knutkirkhorn/gcdUsage
import gcd from '@knutkirkhorn/gcd';
console.log(gcd(28, 2));
// => 2API
gcd(number1, number2)
Returns the gcd of number1 and number2.
The gcd is computed using the Euclidean algorithm.
Related
- @knutkirkhorn/gcd-cli - CLI for this module
