uniform

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uniform

type Uniform struct {
	Min float32
	Max float32
	// contains filtered or unexported fields
}

Uniform is a source of uniformly distributed random numbers. See: https://en.wikipedia.org/wiki/Continuous_uniform_distribution.

func New

func New(min, max float32, generator *rand.LockedRand) *Uniform

New returns a new Normal, initialized with the given min and max parameters.

func (Uniform) Next

func (u Uniform) Next() float32

Next returns a random sample drawn from the distribution.

Jump to

Keyboard shortcuts

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