|
|
|
Get Least Common Denominator
Added on 2/15/2000
|
From Technote #14060 at Macromedia.com
on GetLCD num1, num2
theMin = float(min(num1, num2))
theMax = max(num1, num2)
i = 1
repeat while i < theMin
thisFactor = theMin/i
if thisFactor = integer(thisFactor) then
if theMax/thisFactor = integer(theMax/thisFactor) then
return integer(thisFactor)
end if
end if
i = i + 1
end repeat
return VOID
end
|
|