ww: implement package initialization
This commit is contained in:
@@ -10,7 +10,7 @@ package random;
|
||||
export type random = u64;
|
||||
|
||||
// Mirrors Hare's random::init.
|
||||
export fn init(seed: u64) random = { return seed: random; };
|
||||
export fn fromseed(seed: u64) random = { return seed: random; };
|
||||
|
||||
// SplitMix64, per Hare's random::next.
|
||||
export fn next(r: *random) u64 = {
|
||||
|
||||
Reference in New Issue
Block a user