Skip to main content

Crate semx_rand

Crate semx_rand 

Source
Expand description

xoshiro256++ 伪随机数生成器

非线程安全:多核环境下调用方需自行同步

Functions§

rand32
生成 32 位伪随机数
rand64
生成 64 位伪随机数
rand_range
生成 [0, bound) 范围内的均匀随机数
srand
用 64 位种子初始化状态(通过 SplitMix64 扩展为 256 位)