mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
fix hsvColor types
This commit is contained in:
parent
6ad79aae3e
commit
14e3b04274
@ -63,9 +63,9 @@ namespace glm
|
|||||||
GLM_FUNC_QUALIFIER vec<3, T, Q> hsvColor(const vec<3, T, Q>& rgbColor)
|
GLM_FUNC_QUALIFIER vec<3, T, Q> hsvColor(const vec<3, T, Q>& rgbColor)
|
||||||
{
|
{
|
||||||
vec<3, T, Q> hsv = rgbColor;
|
vec<3, T, Q> hsv = rgbColor;
|
||||||
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
|
T Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
|
||||||
float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
|
T Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
|
||||||
float Delta = Max - Min;
|
T Delta = Max - Min;
|
||||||
|
|
||||||
hsv.z = Max;
|
hsv.z = Max;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user