MCPcopy
hub / github.com/KilledByAPixel/LittleJS / f

Method f

src/engineMath.js:990–993  ·  view source on GitHub ↗
(p, q, t)

Source from the content-addressed store, hash-verified

988 l = clamp(l);
989 const q = l < .5 ? l*(1+s) : l+s-l*s, p = 2*l-q,
990 f = (p, q, t)=>
991 (t = mod(t,1))*6 < 1 ? p+(q-p)*6*t :
992 t*2 < 1 ? q :
993 t*3 < 2 ? p+(q-p)*(4-t*6) : p;
994 this.r = f(p, q, h + 1/3);
995 this.g = f(p, q, h);
996 this.b = f(p, q, h - 1/3);

Callers

nothing calls this directly

Calls 1

modFunction · 0.85

Tested by

no test coverage detected