UNPKG

@japan-d2/gcd

Version:

compute Greatest Common Divisor (GCD)

10 lines (9 loc) 192 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function gcd(a, b) { if (b === 0) { return a; } return gcd(b, a % b); } exports.default = gcd;