random

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AquilaxPerlinNoiseGenerator

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

func (*AquilaxPerlinNoiseGenerator) Get1D

func (*AquilaxPerlinNoiseGenerator) Get2D

func (*AquilaxPerlinNoiseGenerator) Get3D

func (a *AquilaxPerlinNoiseGenerator) Get3D(x, y, z float64) float64

type AquilaxPerlinNoiseGeneratorConfig

type AquilaxPerlinNoiseGeneratorConfig struct {
	Alpha float64
	Beta  float64
	N     int32
	Seed  int64
}

- Alpha: is the weight when the sum is formed, usually around 2 (as this approaches 1 the function is noisier)

- Beta: is the harmonic scaling/spacing, usually around 2

- N is the number of iterations

- Seed is the math.rand seed value to use

type OpenSimplexNoiseGenerator

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

func (*OpenSimplexNoiseGenerator) Get1D

func (*OpenSimplexNoiseGenerator) Get2D

func (o *OpenSimplexNoiseGenerator) Get2D(x, y float64) float64

func (*OpenSimplexNoiseGenerator) Get3D

func (o *OpenSimplexNoiseGenerator) Get3D(x, y, z float64) float64

type OpenSimplexNoiseGeneratorConfig

type OpenSimplexNoiseGeneratorConfig struct {
	Seed int64
}

type PerlinNoiseGenerator

type PerlinNoiseGenerator interface {
	Get1D(x float64) float64
	Get2D(x, y float64) float64
	Get3D(x, y, z float64) float64
}

Jump to

Keyboard shortcuts

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