rng

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixedInt added in v1.6.0

func FixedInt(n int) int

FixedInt returns an integer in [0, n) that always stays the same within one machine.

func InitSeed

func InitSeed()

InitSeed initializes the random seed.

func Int63n

func Int63n(n int64) int64

Intn returns a random int64 from [0, n) with scale down distribution.

func IntRange

func IntRange(m, n int) int

IntRange returns a random int from [m, n) with scale down distribution.

func IntRange64

func IntRange64(m, n int64) int64

IntRange64 returns a random int64 from [m, n) with scale down distribution.

func Intn

func Intn(n int) int

Intn returns a random int from [0, n) with scale down distribution.

func RandTime

func RandTime(begin, end time.Time) time.Time

RandTime returns a random time from [begin, end) with scale down distribution.

Types

This section is empty.

Jump to

Keyboard shortcuts

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