Fix Hsb Convert

This commit is contained in:
Makuna
2016-03-01 16:24:26 -08:00
parent 950f4c553e
commit c4f711a14b

View File

@@ -93,9 +93,13 @@ RgbColor::RgbColor(HsbColor color)
else else
{ {
if (h < 0.0f) if (h < 0.0f)
{
h += 1.0f; h += 1.0f;
if (h > 1.0f) }
else if (h >= 1.0f)
{
h -= 1.0f; h -= 1.0f;
}
h *= 6.0f; h *= 6.0f;
int i = (int)h; int i = (int)h;
float f = h - i; float f = h - i;