RosettaCodeData/Task/Greatest-common-divisor/MAXScript/greatest-common-divisor-1.max
2013-04-11 11:14:19 -07:00

10 lines
110 B
Text

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