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>2012-03-26 10:55:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-26 10:55:09 +0400
commit11d12d945e1a04da102f080f8748514c9bcc0024 (patch)
tree5083c37495889353340751eeda724dc7b10594f9 /source/blender/python/mathutils/mathutils_noise.c
parent7c8c1a0718bebe6dbea7ce3583e29301053a3923 (diff)
style cleanup: python api
Diffstat (limited to 'source/blender/python/mathutils/mathutils_noise.c')
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index 03295ac2752..9460c4d0b36 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -112,13 +112,13 @@
/* Period parameters */
#define N 624
#define M 397
-#define MATRIX_A 0x9908b0dfUL /* constant vector a */
-#define UMASK 0x80000000UL /* most significant w-r bits */
-#define LMASK 0x7fffffffUL /* least significant r bits */
-#define MIXBITS(u,v) (((u) & UMASK) | ((v) & LMASK))
-#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
+#define MATRIX_A 0x9908b0dfUL /* constant vector a */
+#define UMASK 0x80000000UL /* most significant w-r bits */
+#define LMASK 0x7fffffffUL /* least significant r bits */
+#define MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK))
+#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v) & 1UL ? MATRIX_A : 0UL))
-static unsigned long state[N]; /* the array for the state vector */
+static unsigned long state[N]; /* the array for the state vector */
static int left = 1;
static int initf = 0;
static unsigned long *next;
@@ -130,13 +130,13 @@ static void init_genrand(unsigned long s)
state[0] = s & 0xffffffffUL;
for (j = 1; j < N; j++) {
state[j] =
- (1812433253UL *
- (state[j - 1] ^ (state[j - 1] >> 30)) + j);
+ (1812433253UL *
+ (state[j - 1] ^ (state[j - 1] >> 30)) + j);
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous versions, MSBs of the seed affect */
/* only MSBs of the array state[]. */
/* 2002/01/09 modified by Makoto Matsumoto */
- state[j] &= 0xffffffffUL; /* for >32 bit machines */
+ state[j] &= 0xffffffffUL; /* for >32 bit machines */
}
left = 1;
initf = 1;
@@ -215,7 +215,7 @@ static void noise_vector(float x, float y, float z, int nb, float v[3])
/* Returns a turbulence value for a given position (x, y, z) */
static float turb(float x, float y, float z, int oct, int hard, int nb,
- float ampscale, float freqscale)
+ float ampscale, float freqscale)
{
float amp, out, t;
int i;
@@ -334,7 +334,7 @@ PyDoc_STRVAR(M_Noise_random_vector_doc,
);
static PyObject *M_Noise_random_vector(PyObject *UNUSED(self), PyObject *args)
{
- float vec[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+ float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f};
int size = 3;
if (!PyArg_ParseTuple(args, "|i:random_vector", &size))
@@ -729,7 +729,7 @@ static PyObject *M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args)
float vec[3];
float da[4], pa[12];
int dtype = 0;
- float me = 2.5f; /* default minkovsky exponent */
+ float me = 2.5f; /* default minkovsky exponent */
int i;