Last active
August 10, 2016 08:52
-
-
Save lgarczyn/1cd283f3c147e254ebff15b420704c7a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
unsigned int color_average(unsigned int a, unsigned int b) | |
{ | |
return (a & b) + (((a ^ b) >> 1) & 0xFF7F7F7F); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment