CLight: Combine std::max calls
This commit is contained in:
parent
4c03054109
commit
15f151e798
|
@ -70,7 +70,7 @@ float CLight::CalculateIntensity() const
|
||||||
if (mType == ELightType::Custom)
|
if (mType == ELightType::Custom)
|
||||||
coef = mAngleAttenCoefficients.X;
|
coef = mAngleAttenCoefficients.X;
|
||||||
|
|
||||||
return coef * std::max(mColor.R, std::max(mColor.G, mColor.B));
|
return coef * std::max({mColor.R, mColor.G, mColor.B});
|
||||||
#if 0
|
#if 0
|
||||||
// Get the color component with the greatest numeric value
|
// Get the color component with the greatest numeric value
|
||||||
float Greatest = (mColor.G >= mColor.B) ? mColor.G : mColor.B;
|
float Greatest = (mColor.G >= mColor.B) ? mColor.G : mColor.B;
|
||||||
|
|
Loading…
Reference in New Issue