xrand

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-3.0 Imports: 4 Imported by: 2

README

xrand

Random number generation based on golang.org/x/exp/rand

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPair

func NewPair() (*Xrand, *Xrand)

Types

type Xrand

type Xrand struct {
	*rand.Rand
	// contains filtered or unexported fields
}

func New

func New() *Xrand

func NewSlice

func NewSlice(size int) []*Xrand

func NewWithSeed

func NewWithSeed(seed uint64) *Xrand

func (*Xrand) Bool

func (r *Xrand) Bool() bool

func (*Xrand) Buffer

func (r *Xrand) Buffer(size int) []byte

func (*Xrand) Fill

func (r *Xrand) Fill(b []byte)

func (*Xrand) Uniform

func (r *Xrand) Uniform(min, max int) int

Returns a random int between min and max, included

func (*Xrand) UniformFactory

func (r *Xrand) UniformFactory(min, max int) func() int

func (*Xrand) Verify

func (r *Xrand) Verify(b []byte) bool

Jump to

Keyboard shortcuts

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