Skip to content

Commit

Permalink
Merge pull request #77 from Makuna/HsbColorFix
Browse files Browse the repository at this point in the history
Hsbcolorfix
  • Loading branch information
Makuna committed Mar 2, 2016
2 parents 950f4c5 + 8d4e3b0 commit d38d06a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=NeoPixelBus by Makuna
version=2.0.0
version=2.0.1
author=Michael C. Miller ([email protected])
maintainer=Michael C. Miller ([email protected])
sentence=A library that makes controlling NeoPixels (WS2811, WS2812 & SK6812) easy.
Expand Down
6 changes: 5 additions & 1 deletion src/RgbColor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ RgbColor::RgbColor(HsbColor color)
else
{
if (h < 0.0f)
{
h += 1.0f;
if (h > 1.0f)
}
else if (h >= 1.0f)
{
h -= 1.0f;
}
h *= 6.0f;
int i = (int)h;
float f = h - i;
Expand Down

0 comments on commit d38d06a

Please sign in to comment.