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

Function lerpMap

public/src/ex_file/scripts/dna.js:20–20  ·  view source on GitHub ↗
(val, sMin, sMax, dMin, dMax)

Source from the content-addressed store, hash-verified

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)
21
22 const init = () => {
23 renderer = new THREE.WebGLRenderer({

Callers 1

addConnectionFunction · 0.85

Calls 2

lerpFunction · 0.85
normFunction · 0.85

Tested by

no test coverage detected