MCPcopy
hub / github.com/microsoft/SandDance / clamp

Function clamp

docs/app/js/sanddance-app.js:69462–69464  ·  view source on GitHub ↗
(value1, min, max)

Source from the content-addressed store, hash-verified

69460 return map(radians9, (angle)=>Math.atan(angle), result);
69461}
69462function clamp(value1, min, max) {
69463 return map(value1, (value)=>Math.max(min, Math.min(max, value)));
69464}
69465function lerp(a, b, t) {
69466 if (isArray(a)) return a.map((ai, i)=>lerp(ai, b[i], t));
69467 return t * b + (1 - t) * a;

Callers 3

rectangle1Function · 0.70
scaleFunction · 0.70
transformerFunction · 0.70

Calls 3

mapFunction · 0.70
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected