forked from Makuna/NeoPixelBus
Fix Hsb Convert
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user