Documentation ¶
Index ¶
- func HashNoise(position, seed uint32) (value uint32)
- func HashNoise2D(x, y, seed uint32) (value uint32)
- func PerlinNoise1D(x float32, seed int32) float32
- type HashRng
- type RandomNumberGenerator
- type StdLibGenerator
- func (g *StdLibGenerator) Event(chance int) bool
- func (g *StdLibGenerator) Maybe() bool
- func (g *StdLibGenerator) NextFloat32() float32
- func (g *StdLibGenerator) NextUint32() uint32
- func (g *StdLibGenerator) NextUint32InRange(min, max int) (result uint32)
- func (g *StdLibGenerator) NextUint32LessThan(n int) (result uint32)
- func (g *StdLibGenerator) Permutation(max int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashNoise2D ¶
func PerlinNoise1D ¶
*
- 1D Perlin simplex noise
- @param[in] x float coordinate
- @return Noise value in the range[-1; 1], value of 0 on all integer coordinates.
Types ¶
type HashRng ¶
type HashRng struct { RandomNumberGenerator // contains filtered or unexported fields }
func NewHashRng ¶
func NewHashRng() *HashRng
func NewHashRngWithSeed ¶
func (*HashRng) NextFloat32 ¶
func (*HashRng) NextUint32 ¶
func (*HashRng) NextUint32InRange ¶
func (*HashRng) NextUint32LessThan ¶
type RandomNumberGenerator ¶
type StdLibGenerator ¶
type StdLibGenerator struct { RandomNumberGenerator // contains filtered or unexported fields }
func NewStdLibGenerator ¶
func NewStdLibGenerator(seed int64) *StdLibGenerator
func (*StdLibGenerator) Event ¶
func (g *StdLibGenerator) Event(chance int) bool
func (*StdLibGenerator) Maybe ¶
func (g *StdLibGenerator) Maybe() bool
func (*StdLibGenerator) NextFloat32 ¶
func (g *StdLibGenerator) NextFloat32() float32
func (*StdLibGenerator) NextUint32 ¶
func (g *StdLibGenerator) NextUint32() uint32
func (*StdLibGenerator) NextUint32InRange ¶
func (g *StdLibGenerator) NextUint32InRange(min, max int) (result uint32)
func (*StdLibGenerator) NextUint32LessThan ¶
func (g *StdLibGenerator) NextUint32LessThan(n int) (result uint32)
func (*StdLibGenerator) Permutation ¶
func (g *StdLibGenerator) Permutation(max int) []int
Click to show internal directories.
Click to hide internal directories.