rand

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func N

func N[Int intType](n Int) Int

Types

type Rand added in v1.1.6

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

Rand is the Go 1.27 random number generator. It is defined in the patch so that its generic N method is type-checkable.

func New added in v1.1.6

func New(src q.Source) *Rand

func (*Rand) Float32 added in v1.1.6

func (r *Rand) Float32() float32

func (*Rand) Float64 added in v1.1.6

func (r *Rand) Float64() float64

func (*Rand) Int added in v1.1.6

func (r *Rand) Int() int

func (*Rand) Int32 added in v1.1.6

func (r *Rand) Int32() int32

func (*Rand) Int32N added in v1.1.6

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

func (*Rand) Int64 added in v1.1.6

func (r *Rand) Int64() int64

func (*Rand) Int64N added in v1.1.6

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

func (*Rand) IntN added in v1.1.6

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

func (*Rand) N added in v1.1.6

func (r *Rand) N[Int intType127](n Int) Int

func (*Rand) Perm added in v1.1.6

func (r *Rand) Perm(n int) []int

func (*Rand) Shuffle added in v1.1.6

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

func (*Rand) Uint added in v1.1.6

func (r *Rand) Uint() uint

func (*Rand) Uint32 added in v1.1.6

func (r *Rand) Uint32() uint32

func (*Rand) Uint32N added in v1.1.6

func (r *Rand) Uint32N(n uint32) uint32

func (*Rand) Uint64 added in v1.1.6

func (r *Rand) Uint64() uint64

func (*Rand) Uint64N added in v1.1.6

func (r *Rand) Uint64N(n uint64) uint64

func (*Rand) UintN added in v1.1.6

func (r *Rand) UintN(n uint) uint

Jump to

Keyboard shortcuts

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