RosettaCodeData/Task/Greatest-common-divisor/MAXScript/greatest-common-divisor-1.max
2023-07-01 13:44:08 -04:00

10 lines
110 B
Text

fn gcdIter a b =
(
while b > 0 do
(
c = mod a b
a = b
b = c
)
abs a
)