rand

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRandInt

func MustRandInt[T comdef.Int](min T, max T) T

获取随机整数,介于 min 和 max

func MustRandom

func MustRandom(bit int) float64

获取随机小数,介于 0 和 1

func Rand

func Rand[T gx.Number](n T) (T, error)

func RandInt

func RandInt[T comdef.Int](min T, max T) (T, error)

获取随机整数,介于 min 和 max

func Random

func Random(bit int) (float64, error)

获取随机小数,介于 0 和 1

Types

This section is empty.

Jump to

Keyboard shortcuts

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