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