rand

package
v7.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 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 Xor128Rand

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

Xor128Rand is a random number generator

func NewXorRand

func NewXorRand() *Xor128Rand

NewXorRand creates a XOR Shift random number generator.

func (*Xor128Rand) Int64

func (r *Xor128Rand) Int64() int64

Int64 returns a random int64 number. It can be negative.

func (*Xor128Rand) Read

func (r *Xor128Rand) Read(p []byte) (n int, err error)

Read will fill the argument slice with random bytes. Implements the Reader interface.

func (*Xor128Rand) Uint64

func (r *Xor128Rand) Uint64() uint64

Uint64 returns a random uint64 number.

Jump to

Keyboard shortcuts

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