Created
December 31, 2013 03:51
-
-
Save tuttlem/8192352 to your computer and use it in GitHub Desktop.
Noise 1
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
float noise(const int x, const int y) { | |
int n = x + y * 57; | |
n = (n << 13) ^ n; | |
return (1.0f - ( ( n * (n * n * 15731 + 789221) + 1376312589) & 0x7FFFFFFF) / 1073741824.0f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment