MCPcopy Create free account
hub / github.com/microsoft/SandDance / clampScalar

Method clampScalar

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

Source from the content-addressed store, hash-verified

69368 return this.multiplyByScalar(1 / a);
69369 }
69370 clampScalar(min, max) {
69371 for(let i = 0; i < this.ELEMENTS; ++i)this[i] = Math.min(Math.max(this[i], min), max);
69372 return this.check();
69373 }
69374 get elements() {
69375 return this;
69376 }

Callers

nothing calls this directly

Calls 3

checkMethod · 0.95
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected