mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
12 lines
171 B
Text
12 lines
171 B
Text
|
function gcd(num1, num2) {
|
||
|
var a = abs(num1);
|
||
|
var b = abs(num2);
|
||
|
|
||
|
while (b != 0) {
|
||
|
var temp = b;
|
||
|
b = a % b;
|
||
|
a = temp;
|
||
|
}
|
||
|
|
||
|
return a;
|
||
|
}
|