MCPcopy
hub / github.com/graphif/project-graph / extendsTj

Function extendsTj

packages/shapes/src/CubicCatmullRomSpline.ts:177–193  ·  view source on GitHub ↗
(t: number[][], j: number)

Source from the content-addressed store, hash-verified

175 return (Math.pow(4, j) * t[j - 1][k + 1] - t[j - 1][k]) / (Math.pow(4, j) - 1);
176 }
177 function extendsTj(t: number[][], j: number): number {
178 if (j == 0) {
179 const k = t[0].length;
180 const twoPowK = Math.pow(2, k);
181 let sum = 0;
182 for (let j = 1; j <= Math.pow(2, k - 1); j++) {
183 sum += func((2 * j - 1) / twoPowK);
184 }
185 sum = sum / twoPowK + t[0][k - 1] / 2;
186 t[0].push(sum);
187 return sum;
188 } else {
189 const val = tJK(t, j, t[j].length);
190 t[j].push(val);
191 return val;
192 }
193 }
194 extendsTj(t, 0);
195 extendsTj(t, 0);
196 for (let j = 1; ; j++) {

Callers 1

rombergFunction · 0.85

Calls 3

funcFunction · 0.85
tJKFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected