Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Prepare for go modules, and add normalized noise

Compare
Choose a tag to compare
@ojrac ojrac released this 27 Sep 12:05

This release is the first API-breaking change to opensimplex-go. It includes newly contributed normalized noise options, and replaces the Noise struct with an interface, to make room for future options like fractal noise.

New noise options

Noise32: A noise interface that takes float32 values as inputs and returns a float32.

New32(seed): Same data as New(), but cast to float32
NewNormalized(seed): Eval methods return a float64 in [0, 1).
NewNormalized32(seed): Eval methods return a float32 in [0, 1).

Updating

Replace NewWithSeed(seed) with New(seed).
Replace New() with New(0).
The NewWithPerm function has been removed; please open an issue if you want this back.