rand

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RandUtil

type RandUtil struct {
	Source rand.Source
	Rand   *rand.Rand
}

func NewRandUtil

func NewRandUtil(seed int64) *RandUtil

func NewRandUtilFromString

func NewRandUtilFromString(stringSeed string) *RandUtil

func NewRandUtilFromTime

func NewRandUtilFromTime() *RandUtil

func (*RandUtil) Choice

func (sr *RandUtil) Choice(slice []interface{}) interface{}

Generic functions

func (*RandUtil) RandomBool

func (sr *RandUtil) RandomBool() bool

Bool functions

func (*RandUtil) RandomFloat

func (sr *RandUtil) RandomFloat(min float64, max float64) float64

Float functions

func (*RandUtil) RandomInt

func (sr *RandUtil) RandomInt(min int, max int) int

Int functions

func (*RandUtil) StringChoice

func (sr *RandUtil) StringChoice(stringSlice *[]string) string

Array functions

func (*RandUtil) StringChoiceMultiple

func (sr *RandUtil) StringChoiceMultiple(stringSlice *[]string, numChoices int) []string

Jump to

Keyboard shortcuts

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