authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-09-14 19:39:04 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-09-14 19:39:04 -07:00
logc1d46a4d37839675182d91ad2d2b8e799850a8d6
treec92a742a3c5c963a0a19a62b74847d729438624c
parent7669ab8ca2f61cb89672db43a117916d73d84acd

eql() functions should also compare alpha


2 files changed, 2 insertions(+), 2 deletions(-)

LinearRgb.zig+1-1
......@@ -22,7 +22,7 @@ pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self {
2222}
2323
2424pub fn eql(x: Self, y: Self) bool {
25 return x.r == y.r and x.g == y.g and x.b == y.b;
25 return x.r == y.r and x.g == y.g and x.b == y.b and x.a == y.a;
2626}
2727
2828pub fn relative_luminance(x: Self) f32 {
sRGB.zig+1-1
......@@ -42,7 +42,7 @@ pub fn parseHex(input: []const u8) Self {
4242}
4343
4444pub fn eql(x: Self, y: Self) bool {
45 return x.r == y.r and x.g == y.g and x.b == y.b;
45 return x.r == y.r and x.g == y.g and x.b == y.b and x.a == y.a;
4646}
4747
4848pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {