Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pick a random value of a bitmask per point
int num_choices = 5;
int idx = floor(rand(i@id + 65536) * num_choices);
i@bitmask = int(pow(2, idx));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment