rand

package
v0.0.0-...-d05e8a6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose[T any](l []T) T

Choose 从列表中随机出一个元素

func ChooseN

func ChooseN[T any](l []T, n int) []T

ChooseN 从列表中随机出m个元素

func Random

func Random[T constraints.Integer](min, max T) T

Random 从[min,max]之间随机出一个数

func Shuffle

func Shuffle[T any](l []T)

Shuffle 对列表进行乱序

Types

This section is empty.

Jump to

Keyboard shortcuts

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