Skip to content

Instantly share code, notes, and snippets.

View velipso's full-sized avatar

Sean velipso

View GitHub Profile
$ cat smush.c
#include <stdio.h>
#include <stdint.h>
static uint32_t seed = 0, i = 0;
uint32_t smush(){
const uint32_t m = 0x5bd1e995;
const uint32_t k = i++ * m;
seed = (k ^ (k >> 24) ^ (seed * m)) * m;
return seed ^ (seed >> 13);