Merge pull request #1097 from gottfriedleibniz/fix/color

fix hsvColor types #1097
This commit is contained in:
Christophe 2022-04-20 12:25:48 +02:00 committed by GitHub
commit d33344bd86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,9 +63,9 @@ namespace glm
GLM_FUNC_QUALIFIER vec<3, T, Q> hsvColor(const vec<3, T, Q>& rgbColor)
{
vec<3, T, Q> hsv = rgbColor;
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
float Delta = Max - Min;
T Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
T Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
T Delta = Max - Min;
hsv.z = Max;