summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.c b/math.c
index 6fa309d..d1f30dc 100644
--- a/math.c
+++ b/math.c
@@ -765,7 +765,7 @@ static v4 color_rgba_to_hsva(v4 rgba) {
float H = 0;
if (C == 0)
H = 0;
- if (M == R)
+ else if (M == R)
H = fmodf((G - B) / C, 6);
else if (M == G)
H = (B - R) / C + 2;