Lines Matching refs:maxVal
214 << "mediump float maxVal = max(max(r, g), b);"
215 << "mediump float L = (minVal + maxVal) * 0.5;"
216 << "if (minVal == maxVal)"
223 << " S = (maxVal - minVal) / (maxVal + minVal);"
225 << " S = (maxVal - minVal) / (2.0 - maxVal - minVal);"
227 << " mediump float ooDiff = 1.0 / (maxVal - minVal);"
228 << " if (r == maxVal) H = (g - b) * ooDiff;"
229 << " else if (g == maxVal) H = 2.0 + (b - r) * ooDiff;"
240 float maxVal = max(max(r, g), b);
241 float L = (minVal + maxVal) * 0.5f;
244 if (minVal == maxVal)
251 S = (maxVal - minVal) / (maxVal + minVal);
253 S = (maxVal - minVal) / (2.0f - maxVal - minVal);
255 float ooDiff = 1.0f / (maxVal - minVal);
256 if (r == maxVal) H = (g - b) * ooDiff;
257 else if (g == maxVal) H = 2.0f + (b - r) * ooDiff;