mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Fix oklch conversion
We want to normalize angles to be in [0, 360).
This commit is contained in:
parent
fc45d90834
commit
fa3a72c8f6
@ -307,7 +307,10 @@ gtk_oklab_to_oklch (float L, float a, float b,
|
||||
{
|
||||
*L2 = L;
|
||||
*C = sqrtf (a * a + b * b);
|
||||
*H = atan2 (b, a);
|
||||
*H = RAD_TO_DEG (atan2 (b, a));
|
||||
*H = fmod (*H, 360);
|
||||
if (*H < 0)
|
||||
*H += 360;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user