Skip to content

Instantly share code, notes, and snippets.

@kidoman
Created October 4, 2013 15:02
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 kidoman/6827452 to your computer and use it in GitHub Desktop.
Save kidoman/6827452 to your computer and use it in GitHub Desktop.
Rand in Gorays which was not getting inlined
type randFn func() float64
func makeRand(seed uint32) randFn {
return func() float64 {
seed += seed
seed ^= 1
if int32(seed) < 0 {
seed ^= 0x88888eef
}
return float64(seed%95) / float64(95)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment