MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / range

Function range

public/src/ex_file/scripts/dna.js:17–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 const rad = deg => (deg / 180) * Math.PI;
16 const getRandomPoint = () => DENSITY_RADIOUS * Math.random() - (DENSITY_RADIOUS / 2);
17 const range = x => Array(x).fill(0).map((_, index) => index)
18 const norm = (val, min, max) => (val - min) / (max - min)
19 const lerp = (nrm, min, max) => (max - min) * nrm + min
20 const lerpMap = (val, sMin, sMax, dMin, dMax) => lerp(norm(val, sMin, sMax), dMin, dMax)

Callers 3

getPointsFunction · 0.85
addConnectionFunction · 0.85
calculateDnaPointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected