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

Function Yf

resources/vega.min.js:9470–9486  ·  view source on GitHub ↗
(t, e, n, r)

Source from the content-addressed store, hash-verified

9468 Wf = jf * Uf,
9469 Hf = Uf * qf - Pf * Lf;
9470 function Yf(t, e, n, r) {
9471 return 1 === arguments.length
9472 ? (function (t) {
9473 if (t instanceof Gf) return new Gf(t.h, t.s, t.l, t.opacity);
9474 t instanceof af || (t = rf(t));
9475 var e = t.r / 255,
9476 n = t.g / 255,
9477 r = t.b / 255,
9478 i = (Hf * r + If * e - Wf * n) / (Hf + If - Wf),
9479 o = r - i,
9480 a = (jf * (n - i) - qf * o) / Pf,
9481 s = Math.sqrt(a * a + o * o) / (jf * i * (1 - i)),
9482 u = s ? Math.atan2(a, o) * xf - 120 : NaN;
9483 return new Gf(u < 0 ? u + 360 : u, s, i, t.opacity);
9484 })(t)
9485 : new Gf(t, e, n, null == r ? 1 : r);
9486 }
9487 function Gf(t, e, n, r) {
9488 ((this.h = +t), (this.s = +e), (this.l = +n), (this.opacity = +r));
9489 }

Callers 1

rFunction · 0.70

Calls 1

rfFunction · 0.70

Tested by

no test coverage detected