Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProbabilityTrue ¶ added in v0.0.20
func RandString ¶
Types ¶
type SeedRandom ¶ added in v0.0.21
type SeedRandom struct {
// contains filtered or unexported fields
}
func NewRandom ¶ added in v0.0.15
func NewRandom(seed int64) *SeedRandom
NewRandom 创建随机数生成器 指定随机算法的种子
func (*SeedRandom) RandInt ¶ added in v0.0.21
func (s *SeedRandom) RandInt(max int) int
RandInt 生成指定范围内随机数 [0,max]
func (*SeedRandom) RandRangeInt ¶ added in v0.0.21
func (s *SeedRandom) RandRangeInt(min, max int) int
RandRangeInt 生成指定范围内随机数 [min,max]
Click to show internal directories.
Click to hide internal directories.