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:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 03:07:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commit4a78a2774bee655a54391cc8fafae2d20ead2bb0 (patch)
tree666b1985df5b1b029c5cee4af6392c49d51773bf /source/blender/blenlib
parent29401f8ca2c813e50093d2f5503c9bb8868bdde5 (diff)
Cleanup: use bool argument in BLI_noise
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_noise.h5
-rw-r--r--source/blender/blenlib/intern/noise.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h
index 4a41ee68ca9..37afd8ee031 100644
--- a/source/blender/blenlib/BLI_noise.h
+++ b/source/blender/blenlib/BLI_noise.h
@@ -27,7 +27,6 @@
extern "C" {
#endif
-/* noise.h: */
float BLI_noise_hnoise(float noisesize, float x, float y, float z);
float BLI_noise_hnoisep(float noisesize, float x, float y, float z);
float BLI_noise_turbulence(float noisesize, float x, float y, float z, int nr);
@@ -35,9 +34,9 @@ float BLI_noise_turbulence(float noisesize, float x, float y, float z, int nr);
* to replace the above BLI_noise_hnoise/p & BLI_noise_turbulence/1.
* This is done so different noise basis functions can be used */
float BLI_noise_generic_noise(
- float noisesize, float x, float y, float z, int hard, int noisebasis);
+ float noisesize, float x, float y, float z, bool hard, int noisebasis);
float BLI_noise_generic_turbulence(
- float noisesize, float x, float y, float z, int oct, int hard, int noisebasis);
+ float noisesize, float x, float y, float z, int oct, bool hard, int noisebasis);
/* newnoise: musgrave functions */
float BLI_noise_mg_fbm(
float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis);
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index b47de145e2a..bc8135605a8 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -24,7 +24,9 @@
#include <math.h>
#include "BLI_compiler_compat.h"
-#include "BLI_noise.h"
+#include "BLI_sys_types.h"
+
+#include "BLI_noise.h" /* Own include. */
/* local */
static float noise3_perlin(const float vec[3]);
@@ -1155,7 +1157,8 @@ void BLI_noise_cell_v3(float x, float y, float z, float ca[3])
/*****************/
/* newnoise: generic noise function for use with different noisebases */
-float BLI_noise_generic_noise(float noisesize, float x, float y, float z, int hard, int noisebasis)
+float BLI_noise_generic_noise(
+ float noisesize, float x, float y, float z, bool hard, int noisebasis)
{
float (*noisefunc)(float, float, float);
@@ -1213,7 +1216,7 @@ float BLI_noise_generic_noise(float noisesize, float x, float y, float z, int ha
/* newnoise: generic turbulence function for use with different noisebasis */
float BLI_noise_generic_turbulence(
- float noisesize, float x, float y, float z, int oct, int hard, int noisebasis)
+ float noisesize, float x, float y, float z, int oct, bool hard, int noisebasis)
{
float (*noisefunc)(float, float, float);
switch (noisebasis) {