From 6a8aaff03b46275e3bfabb1766cb2fa8064030a1 Mon Sep 17 00:00:00 2001 From: Aayush Alok Date: Sat, 16 Dec 2023 19:58:01 +0530 Subject: [PATCH] Removed simple functions to util.js --- script.js | 12 ------------ utils.js | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 utils.js diff --git a/script.js b/script.js index fcc6d25..73a4885 100644 --- a/script.js +++ b/script.js @@ -68,18 +68,6 @@ inputOnChange(); let process = 1; //resize burst time rows size on +/- -function gcd(x, y) { - while (y) { - let t = y; - y = x % y; - x = t; - } - return x; -} - -function lcm(x, y) { - return (x * y) / gcd(x, y); -} function lcmAll() { let result = 1; diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..ed5bccc --- /dev/null +++ b/utils.js @@ -0,0 +1,14 @@ +function gcd(x, y) { + while (y) { + let t = y; + y = x % y; + x = t; + } + return x; +} + +function lcm(x, y) { + return (x * y) / gcd(x, y); +} + +