Skip to content

Instantly share code, notes, and snippets.

@tuttlem
Created December 31, 2013 03:51
Show Gist options
  • Save tuttlem/8192352 to your computer and use it in GitHub Desktop.
Save tuttlem/8192352 to your computer and use it in GitHub Desktop.
Noise 1
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