diff --git a/modules/juce_graphics/colour/juce_Colour.cpp b/modules/juce_graphics/colour/juce_Colour.cpp index b662bc1ec9..94f2c468e6 100644 --- a/modules/juce_graphics/colour/juce_Colour.cpp +++ b/modules/juce_graphics/colour/juce_Colour.cpp @@ -460,7 +460,7 @@ Colour Colour::withMultipliedLightness (float amount) const noexcept //============================================================================== Colour Colour::brighter (float amount) const noexcept { - jassert (0.0f <= amount && amount <= 1.0f); + jassert (amount >= 0.0f); amount = 1.0f / (1.0f + amount); return Colour ((uint8) (255 - (amount * (255 - getRed()))), @@ -471,7 +471,7 @@ Colour Colour::brighter (float amount) const noexcept Colour Colour::darker (float amount) const noexcept { - jassert (0.0f <= amount && amount <= 1.0f); + jassert (amount >= 0.0f); amount = 1.0f / (1.0f + amount); return Colour ((uint8) (amount * getRed()), diff --git a/modules/juce_graphics/colour/juce_Colour.h b/modules/juce_graphics/colour/juce_Colour.h index 82e2329230..b8fb7535c8 100644 --- a/modules/juce_graphics/colour/juce_Colour.h +++ b/modules/juce_graphics/colour/juce_Colour.h @@ -351,15 +351,15 @@ public: //============================================================================== /** Returns a brighter version of this colour. - @param amountBrighter how much brighter to make it - a value from 0 to 1.0 where 0 is - unchanged, and higher values make it brighter + @param amountBrighter how much brighter to make it - a value greater than or equal to 0, + where 0 is unchanged, and higher values make it brighter @see withMultipliedBrightness */ Colour brighter (float amountBrighter = 0.4f) const noexcept; /** Returns a darker version of this colour. - @param amountDarker how much darker to make it - a value from 0 to 1.0 where 0 is - unchanged, and higher values make it darker + @param amountDarker how much darker to make it - a value greater than or equal to 0, + where 0 is unchanged, and higher values make it darker @see withMultipliedBrightness */ Colour darker (float amountDarker = 0.4f) const noexcept;