Skip to content

Instantly share code, notes, and snippets.

@fboldog
Last active January 8, 2021 12:55
Show Gist options
  • Save fboldog/a76648e1580b88ca9957f60b20edf49c to your computer and use it in GitHub Desktop.
Save fboldog/a76648e1580b88ca9957f60b20edf49c to your computer and use it in GitHub Desktop.
uint wang_hash(uint seed)
{
seed = (seed ^ 61) ^ (seed >> 16);
seed *= 9;
seed = seed ^ (seed >> 4);
seed *= 0x27d4eb2d;
seed = seed ^ (seed >> 15);
return seed;
}
@FIorian
Copy link

FIorian commented Jan 8, 2021

what seed do you usually use with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment