Fix gx.Color math operations (#13315)

pull/13316/head^2
Benjamin Stigsen 2022-01-28 21:53:14 +01:00 committed by GitHub
parent 44dddecc09
commit a4fb5d2cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ pub fn (c Color) + (c2 Color) Color {
r: c.r + c2.r r: c.r + c2.r
g: c.g + c2.g g: c.g + c2.g
b: c.b + c2.b b: c.b + c2.b
a: c.b + c2.a a: c.a + c2.a
} }
} }
@ -153,7 +153,7 @@ pub fn (c Color) - (c2 Color) Color {
r: c.r - c2.r r: c.r - c2.r
g: c.g - c2.g g: c.g - c2.g
b: c.b - c2.b b: c.b - c2.b
a: c.b - c2.a a: c.a - c2.a
} }
} }
@ -162,7 +162,7 @@ pub fn (c Color) * (c2 Color) Color {
r: c.r * c2.r r: c.r * c2.r
g: c.g * c2.g g: c.g * c2.g
b: c.b * c2.b b: c.b * c2.b
a: c.b * c2.a a: c.a * c2.a
} }
} }
@ -171,7 +171,7 @@ pub fn (c Color) / (c2 Color) Color {
r: c.r / c2.r r: c.r / c2.r
g: c.g / c2.g g: c.g / c2.g
b: c.b / c2.b b: c.b / c2.b
a: c.b / c2.a a: c.a / c2.a
} }
} }