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

Function d3_interpolateHcl

explainshell/web/static/js/d3.v3.js:4957–4965  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

4955 }
4956 d3.interpolateHcl = d3_interpolateHcl;
4957 function d3_interpolateHcl(a, b) {
4958 a = d3.hcl(a);
4959 b = d3.hcl(b);
4960 var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
4961 if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
4962 return function(t) {
4963 return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
4964 };
4965 }
4966 d3.interpolateHsl = d3_interpolateHsl;
4967 function d3_interpolateHsl(a, b) {
4968 a = d3.hsl(a);

Callers

nothing calls this directly

Calls 1

d3_hcl_labFunction · 0.85

Tested by

no test coverage detected