You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can special case the .a == 255 case, to not modify the alpha, so that the tests for the defined colors (that are fully visible) will continue to work, while the - can be closer to the reverse operation for the + operation.
I do not see the use case for the current behavior 🤔 .
Describe the bug
gx - operator overloading not working for Color
Reproduction Steps
import gx
print(gx.rgba(128, 128, 128, 255) - gx.rgba(0, 0, 0, 155))
Expected Behavior
gx - operator have to return 128, 128, 128, 100
Current Behavior
return 128, 128, 128, 255
Possible Solution
mut na := int(a.a) - b.a
if na < 0 {
na = 0
}
Additional Information/Context
No response
V version
V 0.4.6 7a36b44
Environment details (OS name and version, etc.)
windows, Microsoft Windows 10 Famille v19045 64 bits
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: