Merge: lib/noise: fix gradient_vector to return a unit vector
authorJean Privat <jean@pryen.org>
Thu, 12 Mar 2015 05:59:10 +0000 (12:59 +0700)
committerJean Privat <jean@pryen.org>
Thu, 12 Mar 2015 05:59:10 +0000 (12:59 +0700)
This was an error in the previous implementation. It will now produce noise with a better/greater amplitude so they are... noisier.

The sample result of InterpolatedNoise shows that it now uses the full amplitude, from 0 to f. The sample result of PerlinNoise uses 1 to d, which is a reasonable portion of the full amplitude of 16 considering that it uses only 4 layers and thus the real amplitude is of 15 (8+4+2+1).

Pull-Request: #1200
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


Trivial merge