rand

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rand

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

Rand is a wrapper around crypto/rand that adds some convenience functions known from math/rand

func (*Rand) Float32

func (r *Rand) Float32() float32

func (*Rand) Float64

func (r *Rand) Float64() float64

func (*Rand) Int

func (r *Rand) Int() int

func (*Rand) Int31

func (r *Rand) Int31() int32

func (*Rand) Int31n

func (r *Rand) Int31n(n int32) int32

Int31n copied from the standard library math/rand implementation of Int31n

func (*Rand) Int63

func (r *Rand) Int63() int64

func (*Rand) Int63n

func (r *Rand) Int63n(n int64) int64

Int63n copied from the standard library math/rand implementation of Int63n

func (*Rand) Intn

func (r *Rand) Intn(n int) int

func (*Rand) Shuffle added in v3.7.1

func (r *Rand) Shuffle(n int, swap func(i, j int))

Shuffle copied from the standard library math/rand implementation of Shuffle

func (*Rand) Uint32

func (r *Rand) Uint32() uint32

func (*Rand) Uint64

func (r *Rand) Uint64() uint64

Jump to

Keyboard shortcuts

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