From c02fb342a7a41db292a0c40ab54fcebea50ffed9 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sat, 9 May 2020 19:37:21 +0200 Subject: [PATCH] Updated comments on noise maps. --- noisemap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noisemap.go b/noisemap.go index ed5060c..eeaf8cc 100644 --- a/noisemap.go +++ b/noisemap.go @@ -35,7 +35,7 @@ func clipNormalized(x float64) float64 { return x } -// Value generates the noise value for an x/y pair. The range of the output is approximately [-1.325825214,1.325825214] (for 4 harmonics). +// Value generates the noise value for an x/y pair. func (m *noiseMap) Value(x, y int32) float64 { value := m.noise.Noise2D(float64(x)*.01, float64(y)*.01, m.alpha, m.beta, m.harmonics)*.565 + .5 return clipNormalized(value) @@ -45,7 +45,7 @@ type randomNoiseMap struct { *noise.Perlin } -// Value generates the noise value for an x/y pair. The range of the output is approximately [-1.325825214,1.325825214] (for 4 harmonics). +// Value generates the noise value for an x/y pair. func (m randomNoiseMap) Value(x, y int32) float64 { value := m.Noise2D(float64(x)*.53, float64(y)*.53, 1.01, 2, 2)*.5 + .5 return clipNormalized(value)