rand

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uint32

func Uint32() uint32

Uint32 returns pseudorandom uint32.

It is safe calling this function from concurrent goroutines.

func Uint32n

func Uint32n(maxN uint32) uint32

Uint32n returns pseudorandom uint32 in the range [0..maxN).

It is safe calling this function from concurrent goroutines.

Types

type RNG

type RNG struct {
	// contains filtered or unexported fields
}

RNG is a pseudorandom number generator.

It is unsafe to call RNG methods from concurrent goroutines.

func (*RNG) Uint32

func (r *RNG) Uint32() uint32

Uint32 returns pseudorandom uint32.

It is unsafe to call this method from concurrent goroutines.

func (*RNG) Uint32n

func (r *RNG) Uint32n(maxN uint32) uint32

Uint32n returns pseudorandom uint32 in the range [0..maxN).

It is unsafe to call this method from concurrent goroutines.

Jump to

Keyboard shortcuts

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