eastern-flames/eastern flames/scripts/gcd/gcd.gml
2022-08-07 14:14:04 -07:00

4 lines
No EOL
158 B
Text

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);
}