Created
January 28, 2013 01:13
-
-
Save thoward/4651922 to your computer and use it in GitHub Desktop.
This should be true for all values of x, y, z, and w (when comparing to zero anyway)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x=0; | |
int y=0; | |
int z=0; | |
int w=0; | |
var bitwise_or = (x | y | z | w) == 0; | |
var equality = x == 0 && y == 0 && z == 0 && w == 0; | |
System.Diagnostics.Debug.Assert(bitwise_or == equality); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment