MCPcopy Create free account
hub / github.com/alignoth/alignoth / lf

Function lf

resources/vega.min.js:9150–9152  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

9148 return `${1 === t ? "rgb(" : "rgba("}${cf(this.r)}, ${cf(this.g)}, ${cf(this.b)}${1 === t ? ")" : `, ${t})`}`;
9149 }
9150 function lf(t) {
9151 return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
9152 }
9153 function cf(t) {
9154 return Math.max(0, Math.min(255, Math.round(t) || 0));
9155 }

Callers 3

ufFunction · 0.70
clampFunction · 0.70
formatHslFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected