randx

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(min, max int) int

Int [min, max) 随机数生成 crypto/rand 生成安全的随机数,相比math/rand性能更好,推荐使用

func Int64

func Int64(min, max int64) int64

Int64 [min, max) 随机数生成 crypto/rand 生成安全的随机数,相比math/rand性能更好,推荐使用

func Int64x

func Int64x(min, max int64) int64

Int64x [min, max) 随机数生成. math/rand 生成的随机数相比crypto/rand性能更差. Deprecated: use Int64() instead.

func Intx

func Intx(min, max int) int

Intx [min, max) 随机数生成. math/rand 生成的随机数相比crypto/rand性能更差. Deprecated: use Int() instead.

func IsBingo added in v0.0.4

func IsBingo(percent int) bool

IsBingo 是否中奖

percent: 概率 (%)

func IsBingo64 added in v0.0.4

func IsBingo64(percent int64) bool

IsBingo64 是否中奖

percent: 概率 (%)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL