MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / getColorIndex

Function getColorIndex

MathBox/mathbox-bundle.js:10423–10438  ·  view source on GitHub ↗
( color )

Source from the content-addressed store, hash-verified

10421 }
10422
10423 function getColorIndex( color ) {
10424
10425 var hash = color.r.toString() + color.g.toString() + color.b.toString();
10426
10427 if ( colorsHash[ hash ] !== undefined ) {
10428
10429 return colorsHash[ hash ];
10430
10431 }
10432
10433 colorsHash[ hash ] = colors.length;
10434 colors.push( color.getHex() );
10435
10436 return colorsHash[ hash ];
10437
10438 }
10439
10440 function getUvIndex( uv ) {
10441

Callers 1

mathbox-bundle.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected