| ... | ... | @@ -3,7 +3,6 @@ |
| 3 | 3 | const std = @import("std"); |
| 4 | 4 | const Self = @This(); |
| 5 | 5 | const color = @import("./mod.zig"); |
| 6 | | const _x = @import("./x.zig"); |
| 7 | 6 | |
| 8 | 7 | r: u8, // red value |
| 9 | 8 | g: u8, // green value |
| ... | ... | @@ -123,7 +122,7 @@ pub fn to_hsl(x: Self) color.HSL { |
| 123 | 122 | unreachable; |
| 124 | 123 | }; |
| 125 | 124 | const l = (cmax + cmin) / 2; |
| 126 | | const s = if (delta == 0) 0 else delta / (1 - _x.abs(2 * l - 1)); |
| 125 | const s = if (delta == 0) 0 else delta / (1 - @fabs(2 * l - 1)); |
| 127 | 126 | const a = f.a; |
| 128 | 127 | return color.HSL.initHSLA(h, s, l, a); |
| 129 | 128 | } |