MCPcopy Create free account
hub / github.com/idank/explainshell / v

Function v

explainshell/web/static/js/d3.v3.js:1271–1277  ·  view source on GitHub ↗
(h)

Source from the content-addressed store, hash-verified

1269 m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
1270 m1 = 2 * l - m2;
1271 function v(h) {
1272 if (h > 360) h -= 360; else if (h < 0) h += 360;
1273 if (h < 60) return m1 + (m2 - m1) * h / 60;
1274 if (h < 180) return m2;
1275 if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
1276 return m1;
1277 }
1278 function vv(h) {
1279 return Math.round(v(h) * 255);
1280 }

Callers 1

vvFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected