I've the given condition from a cpp source.
if (!(faces & activeFace) || [...]) { ... }
I want to translate this into C#.
When I understand this right, this means as much as if activeFace is *not* in faces then...
- not?
So what would be the equivalent in C#?
Note: I can't use faces.HasFlag(activeFace)
Well it should be
if ((faces & activeFace) == 0 || [...]) { ... }
Am I right?
For the completeness here the actual Flag enum
[Flags]
enum Face {
North = 1,
East = 2,
South = 4,
West = 8,
Top = 16,
Bottom = 32
};
Well It's the same in cpp, you just need to add a [Flags]
attribute in C#