Documentation ¶
Index ¶
- func GenerateUniqueSeed() int64
- func Stafford13(seed int64) int64
- type LegacyRandomSource
- func (l *LegacyRandomSource) Next(bits int) int
- func (l *LegacyRandomSource) NextBoolean() bool
- func (l *LegacyRandomSource) NextDouble() float64
- func (l *LegacyRandomSource) NextFloat() float32
- func (l *LegacyRandomSource) NextGaussian() float64
- func (l *LegacyRandomSource) NextInt(n int) int
- func (l *LegacyRandomSource) NextLong() int64
- func (l *LegacyRandomSource) SetSeed(seed int64)
- type MarsagliaPolarGaussian
- type RandomSource
- type Seed128
- type WorldGenRandom
- func (w *WorldGenRandom) Next(bits int) int
- func (w *WorldGenRandom) SeedSlimeChunk(x, z, salt int32) RandomSource
- func (w *WorldGenRandom) SetDecoration(seed int64, x, z int32)
- func (w *WorldGenRandom) SetFeature(seed int64, x, z int32)
- func (w *WorldGenRandom) SetLargeFeature(seed int64, x, z int32)
- func (w *WorldGenRandom) SetLargeFeatureSalt(seed int64, x, z, salt int32)
- func (w *WorldGenRandom) SetSeed(seed int64)
- type Xoroshiro128
- type XoroshiroSource
- func (x *XoroshiroSource) NextBoolean() bool
- func (x *XoroshiroSource) NextDouble() float64
- func (x *XoroshiroSource) NextFloat() float32
- func (x *XoroshiroSource) NextGaussian() float64
- func (x *XoroshiroSource) NextInt(bits int) int
- func (x *XoroshiroSource) NextLong() int64
- func (x *XoroshiroSource) SetSeed(seed int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateUniqueSeed ¶
func GenerateUniqueSeed() int64
GenerateUniqueSeed generates a unique seed.
func Stafford13 ¶
Types ¶
type LegacyRandomSource ¶
type LegacyRandomSource struct { RandomSource // contains filtered or unexported fields }
func NewLegacyRandomSource ¶
func NewLegacyRandomSource(seed int64) *LegacyRandomSource
func NewLegacyRandomSourceAt ¶
func NewLegacyRandomSourceAt(x, y, z int32, seed int64) *LegacyRandomSource
func (*LegacyRandomSource) Next ¶
func (l *LegacyRandomSource) Next(bits int) int
func (*LegacyRandomSource) NextBoolean ¶
func (l *LegacyRandomSource) NextBoolean() bool
func (*LegacyRandomSource) NextDouble ¶
func (l *LegacyRandomSource) NextDouble() float64
func (*LegacyRandomSource) NextFloat ¶
func (l *LegacyRandomSource) NextFloat() float32
func (*LegacyRandomSource) NextGaussian ¶
func (l *LegacyRandomSource) NextGaussian() float64
func (*LegacyRandomSource) NextInt ¶
func (l *LegacyRandomSource) NextInt(n int) int
func (*LegacyRandomSource) NextLong ¶
func (l *LegacyRandomSource) NextLong() int64
func (*LegacyRandomSource) SetSeed ¶
func (l *LegacyRandomSource) SetSeed(seed int64)
type MarsagliaPolarGaussian ¶
type MarsagliaPolarGaussian struct { Source RandomSource // contains filtered or unexported fields }
func NewMarsagliaPolarGaussian ¶
func NewMarsagliaPolarGaussian(source RandomSource) *MarsagliaPolarGaussian
func (*MarsagliaPolarGaussian) Next ¶
func (m *MarsagliaPolarGaussian) Next() float64
func (*MarsagliaPolarGaussian) Reset ¶
func (m *MarsagliaPolarGaussian) Reset()
type RandomSource ¶
type Seed128 ¶
type Seed128 [2]int64
func UpgradeSeed ¶
UpgradeSeed takes a int64 seed and transforms it into a Seed128
type WorldGenRandom ¶
type WorldGenRandom struct { *LegacyRandomSource // contains filtered or unexported fields }
func NewWorldGeneration ¶
func NewWorldGeneration(source RandomSource) *WorldGenRandom
func (*WorldGenRandom) Next ¶
func (w *WorldGenRandom) Next(bits int) int
func (*WorldGenRandom) SeedSlimeChunk ¶
func (w *WorldGenRandom) SeedSlimeChunk(x, z, salt int32) RandomSource
func (*WorldGenRandom) SetDecoration ¶
func (w *WorldGenRandom) SetDecoration(seed int64, x, z int32)
func (*WorldGenRandom) SetFeature ¶
func (w *WorldGenRandom) SetFeature(seed int64, x, z int32)
func (*WorldGenRandom) SetLargeFeature ¶
func (w *WorldGenRandom) SetLargeFeature(seed int64, x, z int32)
func (*WorldGenRandom) SetLargeFeatureSalt ¶
func (w *WorldGenRandom) SetLargeFeatureSalt(seed int64, x, z, salt int32)
func (*WorldGenRandom) SetSeed ¶
func (w *WorldGenRandom) SetSeed(seed int64)
type Xoroshiro128 ¶
type Xoroshiro128 Seed128
func NewXoroshiro128 ¶
func NewXoroshiro128(seed Seed128) *Xoroshiro128
func (*Xoroshiro128) Next ¶
func (x *Xoroshiro128) Next() int64
type XoroshiroSource ¶
type XoroshiroSource struct { RandomSource // contains filtered or unexported fields }
func NewXoroshiroRandomSource ¶
func NewXoroshiroRandomSource(seed int64) *XoroshiroSource
func NewXoroshiroRandomSourceAt ¶
func NewXoroshiroRandomSourceAt(x, y, z int32, seed int64) *XoroshiroSource
func (*XoroshiroSource) NextBoolean ¶
func (x *XoroshiroSource) NextBoolean() bool
func (*XoroshiroSource) NextDouble ¶
func (x *XoroshiroSource) NextDouble() float64
func (*XoroshiroSource) NextFloat ¶
func (x *XoroshiroSource) NextFloat() float32
func (*XoroshiroSource) NextGaussian ¶
func (x *XoroshiroSource) NextGaussian() float64
func (*XoroshiroSource) NextInt ¶
func (x *XoroshiroSource) NextInt(bits int) int
func (*XoroshiroSource) NextLong ¶
func (x *XoroshiroSource) NextLong() int64
func (*XoroshiroSource) SetSeed ¶
func (x *XoroshiroSource) SetSeed(seed int64)
Click to show internal directories.
Click to hide internal directories.