Skip to content

Instantly share code, notes, and snippets.

@JacquesLucke
Created December 12, 2019 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JacquesLucke/a30303ce4c7d9c3242885f4da7b4412d to your computer and use it in GitHub Desktop.
Save JacquesLucke/a30303ce4c7d9c3242885f4da7b4412d to your computer and use it in GitHub Desktop.
uint a = BLI_rng_get_uint(rng);
uint b = 0x3F800000 | (0x007FFFFF & a);
float c = *(float *)&b;
return c - 1.0f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment