NoiseGo

command module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 5 Imported by: 0

README

NoiseGo

Implementation of Improved Perlin Noise in Golang.

Preview

Usage


import(
    "github.com/TadaTeruki/NoiseGo/v2/noise"
)

func main(){
//  noise.New(seed int64, maxValue uint64) noise.Noise             
//   - Initialize noise generator 
//      maxValue : maximum coordinate value
    nz := noise.New(255)
    
    
// noise.Get(x, y float64) float64
//  - Get noise value with coordinate(x, y)
    r1 := nz.Get(200.2, 81.4)
    
// noise.GetOctaved(x, y float64, octaves int, persistence float64) float64
//  - Get octaved noise value with coordinate(x, y) and parameters(octaves, persistence)
    r2 := nz.GetOctaved(200.2, 81.4, 10, 0.5)
 
}
maxValue = 30 maxValue = 3

Installation

 $ go get -u github.com/TadaTeruki/NoiseGo/v2

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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