Created
June 15, 2016 13:36
-
-
Save zaccone/95795ed7885a7fafa274a53abda5f4d7 to your computer and use it in GitHub Desktop.
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 hash(const int x, const int y) | |
{ | |
int hash = 17; | |
hash = ((hash + x) << 5) - (hash + x); | |
hash = ((hash + y) << 5) - (hash + y); | |
return hash; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment