1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Fix gx.Color math operations (#13315)

This commit is contained in:
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

View File

@ -144,7 +144,7 @@ pub fn (c Color) + (c2 Color) Color {
r: c.r + c2.r
g: c.g + c2.g
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
g: c.g - c2.g
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
g: c.g * c2.g
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
g: c.g / c2.g
b: c.b / c2.b
a: c.b / c2.a
a: c.a / c2.a
}
}