mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Changed: #1219 Bad color when rgba.cpp is compiled with GCC 4.2.4
This commit is contained in:
parent
4a86cad7a9
commit
b909986c61
1 changed files with 5 additions and 0 deletions
|
@ -646,6 +646,11 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const
|
||||||
{
|
{
|
||||||
h = 4.f + (r - g) / diff;
|
h = 4.f + (r - g) / diff;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this case is to fix a compiler bug
|
||||||
|
h = (g - b) / diff;
|
||||||
|
}
|
||||||
|
|
||||||
h *= 60.f; // scale to [0..360]
|
h *= 60.f; // scale to [0..360]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue