MCPcopy Index your code
hub / github.com/plotly/plotly.js / leastCommonMultiple

Function leastCommonMultiple

src/traces/surface/convert.js:196–207  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

194}
195
196function leastCommonMultiple(a, b) {
197 if(a < 1 || b < 1) return undefined;
198 var A = getFactors(a);
199 var B = getFactors(b);
200 var n = 1;
201 for(var i = 0; i < shortPrimes.length; i++) {
202 n *= Math.pow(
203 shortPrimes[i], Math.max(A[i], B[i])
204 );
205 }
206 return n;
207}
208
209function arrayLCM(A) {
210 if(A.length === 0) return undefined;

Callers 1

arrayLCMFunction · 0.85

Calls 1

getFactorsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…