MCPcopy Create free account
hub / github.com/arguiot/TheoremJS / linspace

Method linspace

__test__/theorem.js:1325–1329  ·  view source on GitHub ↗
(start, end, n)

Source from the content-addressed store, hash-verified

1323 return array.reduce((a, b) => a.concat(b), []);
1324 }
1325 linspace(start, end, n) {
1326 const diff = end - start;
1327 const step = diff / n;
1328 return this.arange(start, end, step);
1329 }
1330 arange(start, end, step, offset) {
1331 const len = (Math.abs(end - start) + ((offset || 0) * 2)) / (step || 1) + 1;
1332 const direction = start < end ? 1 : -1;

Callers 1

test.jsFile · 0.80

Calls 1

arangeMethod · 0.95

Tested by

no test coverage detected