Z
Zytan
I wanted to do something simple like checking my own Color variable
against Color.Black, and == returned false, even though their RGB
values were all 0! Of course, there's the A (alpha) value, but that's
0, too (I assume). I guess I naively thought that == would be
overloaded to work in this case, just dealing with RGB. I guess I
have to compare R, G, and B separately.
Is this the standard way to deal with this? I know some structs just
can't be compared, but this is a color. I could even see that the
alpha channel needs to be the same, but I would think it is always 0,
unless otherwise needed.
Zytan
against Color.Black, and == returned false, even though their RGB
values were all 0! Of course, there's the A (alpha) value, but that's
0, too (I assume). I guess I naively thought that == would be
overloaded to work in this case, just dealing with RGB. I guess I
have to compare R, G, and B separately.
Is this the standard way to deal with this? I know some structs just
can't be compared, but this is a color. I could even see that the
alpha channel needs to be the same, but I would think it is always 0,
unless otherwise needed.
Zytan