MCPcopy Create free account
hub / github.com/AlloyTeam/PhyTouch / hue2rgb

Function hue2rgb

example/threejs/asset/three.js:416–425  ·  view source on GitHub ↗
( p, q, t )

Source from the content-addressed store, hash-verified

414 setHSL: function () {
415
416 function hue2rgb( p, q, t ) {
417
418 if ( t < 0 ) t += 1;
419 if ( t > 1 ) t -= 1;
420 if ( t < 1 / 6 ) return p + ( q - p ) * 6 * t;
421 if ( t < 1 / 2 ) return q;
422 if ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t );
423 return p;
424
425 }
426
427 return function setHSL( h, s, l ) {
428

Callers 1

three.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected