mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-05 15:56:00 +02:00
HSL grayscale NaN fix
This commit is contained in:
parent
50a8ff4332
commit
e1bd728326
1 changed files with 3 additions and 1 deletions
|
@ -141,7 +141,9 @@ namespace Beefy.gfx
|
||||||
h = -1;
|
h = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (r == max)
|
if (delta == 0)
|
||||||
|
h = 0;
|
||||||
|
else if (r == max)
|
||||||
h = (g - b) / delta; // between yellow & magenta
|
h = (g - b) / delta; // between yellow & magenta
|
||||||
else if (g == max)
|
else if (g == max)
|
||||||
h = 2 + (b - r) / delta; // between cyan & yellow
|
h = 2 + (b - r) / delta; // between cyan & yellow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue