Created
October 4, 2013 15:02
-
-
Save kidoman/6827452 to your computer and use it in GitHub Desktop.
Rand in Gorays which was not getting inlined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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