rand

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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