| ... | @@ -125,7 +125,7 @@ pub fn to_hsl(x: Self) color.HSL { | ... | @@ -125,7 +125,7 @@ pub fn to_hsl(x: Self) color.HSL { |
| 125 | unreachable; | 125 | unreachable; |
| 126 | }; | 126 | }; |
| 127 | const l = (cmax + cmin) / 2; | 127 | const l = (cmax + cmin) / 2; |
| 128 | const s = if (delta == 0) 0 else delta / (1 - @fabs(2 * l - 1)); | 128 | const s = if (delta == 0) 0 else delta / (1 - @abs(2 * l - 1)); |
| 129 | const a = f.a; | 129 | const a = f.a; |
| 130 | return color.HSL.initHSLA(h, s, l, a); | 130 | return color.HSL.initHSLA(h, s, l, a); |
| 131 | } | 131 | } |