rng

package
v0.0.0-...-2271788 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxSmallNumber = 5

Variables

This section is empty.

Functions

func Choose

func Choose[S ~[]E, E constraints.Ordered](s S) E

func ChooseRune

func ChooseRune(s string) rune

func ChooseWithWeights

func ChooseWithWeights[S ~[]E, E constraints.Ordered](s S, weights []uint) E

func New

func New() rand.Rand

func RandomBoolean

func RandomBoolean() bool

func RandomIndex

func RandomIndex(end int) int

func RandomSmallNumber

func RandomSmallNumber() int

func ShuffleSlice

func ShuffleSlice(a *[]interface{})

func ShuffledSlice

func ShuffledSlice(a []interface{}) []interface{}

func ShuffledString

func ShuffledString(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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