Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/noise.c')
-rw-r--r--source/blender/blenlib/intern/noise.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index d6b8582ef26..141e5438bc9 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -199,8 +199,15 @@ float hashvectf[768]= {
/* IMPROVED PERLIN NOISE */
/**************************/
-#define lerp(t, a, b) ((a)+(t)*((b)-(a)))
-#define npfade(t) ((t)*(t)*(t)*((t)*((t)*6-15)+10))
+static float lerp(float t, float a, float b)
+{
+ return (a+t*(b-a));
+}
+
+static float npfade(float t)
+{
+ return (t*t*t*(t*(t*6.0f-15.0f)+10.0f));
+}
static float grad(int hash, float x, float y, float z)
{