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

Function clamp

docs/tests/v2/es6/js/sanddance.js:15326–15330  ·  view source on GitHub ↗
(value, min, max)

Source from the content-addressed store, hash-verified

15324}
15325
15326function clamp(value, min, max) {
15327 return map(value, function (value) {
15328 return Math.max(min, Math.min(max, value));
15329 });
15330}
15331
15332function lerp(a, b, t) {
15333 if (isArray(a)) {

Callers 3

rectangleFunction · 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