From 0950b977754c07b7ee2404512a36d624413cc31f Mon Sep 17 00:00:00 2001 From: maxcorsini Date: Tue, 4 Feb 2014 16:09:36 +0000 Subject: [PATCH] invalid output range - fixed --- vcg/math/perlin_noise.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcg/math/perlin_noise.h b/vcg/math/perlin_noise.h index 0cca49f3..4f33d8a7 100644 --- a/vcg/math/perlin_noise.h +++ b/vcg/math/perlin_noise.h @@ -37,7 +37,7 @@ class Perlin public: /// 3D Perlin noise - /// return a value in the 0..1 range with period 255 + /// return a value in the -1..1 range with period 255 static double Noise(double x, double y, double z) { int X = (int)floor(x) & 255, // FIND UNIT CUBE THAT Y = (int)floor(y) & 255, // CONTAINS POINT.