From a8528a9e1dc19dc824b74565a50c5fd2f6d799ec Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Wed, 26 Oct 2011 08:10:57 -0400 Subject: [PATCH] Fix rgb2hsv --- cuburn/code/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuburn/code/util.py b/cuburn/code/util.py index 7f38bd8..a16163d 100644 --- a/cuburn/code/util.py +++ b/cuburn/code/util.py @@ -155,7 +155,7 @@ float3 rgb2hsv(float3 rgb) { float bc = (M - rgb.z) * C; if (rgb.x == M) h = bc - gc; - else if (rgb.y == M) h = 2 + gc - bc; + else if (rgb.y == M) h = 2 + rc - bc; else h = 4 + gc - rc; if (h < 0) h += 6;