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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 229a06948c2..42b5ba28f5a 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -23,6 +23,7 @@
#include <math.h>
+#include "BLI_compiler_compat.h"
#include "BLI_noise.h"
/* local */
@@ -264,17 +265,17 @@ static const float hashvectf[768] = {
/* IMPROVED PERLIN NOISE */
/**************************/
-static float lerp(float t, float a, float b)
+BLI_INLINE float lerp(float t, float a, float b)
{
return (a + t * (b - a));
}
-static float npfade(float t)
+BLI_INLINE float npfade(float t)
{
return (t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f));
}
-static float grad(int hash_val, float x, float y, float z)
+BLI_INLINE float grad(int hash_val, float x, float y, float z)
{
int h = hash_val & 15; /* CONVERT LO 4 BITS OF HASH CODE */
float u = h < 8 ? x : y; /* INTO 12 GRADIENT DIRECTIONS. */