[Bf-blender-cvs] [155f42a12f4] master: Cleanup: remove unused BLI_turbulence1

Campbell Barton noreply at git.blender.org
Fri Nov 6 02:41:46 CET 2020


Commit: 155f42a12f45094e248d0f1e2a1dbd4ed6be8e85
Author: Campbell Barton
Date:   Fri Nov 6 10:38:51 2020 +1100
Branches: master
https://developer.blender.org/rB155f42a12f45094e248d0f1e2a1dbd4ed6be8e85

Cleanup: remove unused BLI_turbulence1

A slightly modified version of BLI_turbulence1, unused for years.

===================================================================

M	source/blender/blenlib/BLI_noise.h
M	source/blender/blenlib/intern/noise.c

===================================================================

diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h
index e9279f03e24..8cb30ef62c8 100644
--- a/source/blender/blenlib/BLI_noise.h
+++ b/source/blender/blenlib/BLI_noise.h
@@ -31,7 +31,6 @@ extern "C" {
 float BLI_hnoise(float noisesize, float x, float y, float z);
 float BLI_hnoisep(float noisesize, float x, float y, float z);
 float BLI_turbulence(float noisesize, float x, float y, float z, int nr);
-float BLI_turbulence1(float noisesize, float x, float y, float z, int nr);
 /* newnoise: generic noise & turbulence functions
  * to replace the above BLI_hnoise/p & BLI_turbulence/1.
  * This is done so different noise basis functions can be used */
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 82ceb36c0e1..889e336bb52 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -454,23 +454,6 @@ float BLI_turbulence(float noisesize, float x, float y, float z, int nr)
   return s / div;
 }
 
-float BLI_turbulence1(float noisesize, float x, float y, float z, int nr)
-{
-  float s, d = 0.5, div = 1.0;
-
-  s = fabsf((-1.0f + 2.0f * BLI_hnoise(noisesize, x, y, z)));
-
-  while (nr > 0) {
-
-    s += fabsf(d * (-1.0f + 2.0f * BLI_hnoise(noisesize * d, x, y, z)));
-    div += d;
-    d *= 0.5f;
-
-    nr--;
-  }
-  return s / div;
-}
-
 /* ********************* FROM PERLIN HIMSELF: ******************** */
 
 static const char g_perlin_data_ub[512 + 2] = {



More information about the Bf-blender-cvs mailing list