MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / gcd_for_two

Function gcd_for_two

web/pgadmin/static/js/utils.js:92–94  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

90/* Eucladian GCD */
91export function getGCD(inp_arr) {
92 let gcd_for_two = (a, b) => {
93 return a == 0?b:gcd_for_two(b % a, a);
94 };
95
96 let inp_len = inp_arr.length;
97 if(inp_len <= 2) {

Callers 1

getGCDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected