2022-08-07 14:14:04 -07:00

4 lines
158 B
Plaintext

function gcd(a, b) {
//https://stackoverflow.com/questions/21570890/java-get-greatest-common-divisor-which-method-is-better
return b==0 ? a : gcd(b, a%b);
}