mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Colour: Fix comparisons in HSL conversions
This commit is contained in:
parent
7a592bd6c2
commit
0c56fa8fa0
1 changed files with 2 additions and 2 deletions
|
|
@ -82,12 +82,12 @@ namespace ColourHelpers
|
|||
|
||||
lightness = ((float) (hi + lo) / 2.0f) / 255.0f;
|
||||
|
||||
if (lightness < 0.0f)
|
||||
if (lightness <= 0.0f)
|
||||
return;
|
||||
|
||||
hue = getHue (col);
|
||||
|
||||
if (1.0f < lightness)
|
||||
if (1.0f <= lightness)
|
||||
return;
|
||||
|
||||
auto denominator = 1.0f - std::abs ((2.0f * lightness) - 1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue