eastern-flames/eastern flames/scripts/gcd/gcd.gml

4 lines
158 B
Plaintext
Raw Normal View History

2022-08-07 21:14:04 +00:00
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);
}