Documentation
¶
Index ¶
- Constants
- func Choose[S ~[]E, E constraints.Ordered](s S) E
- func ChooseRune(s string) rune
- func ChooseWithWeights[S ~[]E, E constraints.Ordered](s S, weights []uint) E
- func New() rand.Rand
- func RandomBoolean() bool
- func RandomIndex(end int) int
- func RandomSmallNumber() int
- func ShuffleSlice(a *[]interface{})
- func ShuffledSlice(a []interface{}) []interface{}
- func ShuffledString(s string) string
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 ChooseWithWeights ¶
func ChooseWithWeights[S ~[]E, E constraints.Ordered](s S, weights []uint) E
func RandomBoolean ¶
func RandomBoolean() bool
func RandomIndex ¶
func RandomSmallNumber ¶
func RandomSmallNumber() int
func ShuffleSlice ¶
func ShuffleSlice(a *[]interface{})
func ShuffledSlice ¶
func ShuffledSlice(a []interface{}) []interface{}
func ShuffledString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.