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:
authorAntonio Vazquez <blendergit@gmail.com>2021-04-29 16:41:27 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-04-29 16:45:03 +0300
commit933de8201e8c0ef844478e8bf000dd8d32c7bcdf (patch)
tree264f8698f05cdf60be8693aad0b123f1e8cfc9c0 /source/blender/gpencil_modifiers
parent6a2bc40e0131aa2689aa37a915f672f28fed8aa8 (diff)
Cleanup: Add float format
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
index 56882caa2a3..a9d4d5091ec 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
@@ -28,8 +28,8 @@
#include "BLT_translation.h"
-#include "BLI_math.h"
#include "BLI_hash.h"
+#include "BLI_math.h"
#include "BLI_rand.h"
#include "DNA_defaults.h"
@@ -117,21 +117,21 @@ static void deformStroke(GpencilModifierData *md,
}
for (int j = 0; j < 3; j++) {
const uint primes[3] = {2, 3, 7};
- double offset[3] = {0.0, 0.0, 0.0};
+ double offset[3] = {0.0f, 0.0f, 0.0f};
double r[3];
/* To ensure a nice distribution, we use halton sequence and offset using the seed. */
BLI_halton_3d(primes, offset, rnd_index, r);
- if ((mmd->flag & GP_OFFSET_UNIFORM_RANDOM_SCALE) && j == 2) {
+ if ((mmd->flag & GP_OFFSET_UNIFORM_RANDOM_SCALE) && j == 2) {
float rand_value;
- rand_value = fmodf(r[0] * 2.0 - 1.0 + rand_offset, 1.0f);
- rand_value = fmodf(sin(rand_value * 12.9898 + j * 78.233) * 43758.5453, 1.0f);
+ rand_value = fmodf(r[0] * 2.0f - 1.0f + rand_offset, 1.0f);
+ rand_value = fmodf(sin(rand_value * 12.9898f + j * 78.233f) * 43758.5453f, 1.0f);
copy_v3_fl(rand[j], rand_value);
}
else {
for (int i = 0; i < 3; i++) {
- rand[j][i] = fmodf(r[i] * 2.0 - 1.0 + rand_offset, 1.0f);
- rand[j][i] = fmodf(sin(rand[j][i] * 12.9898 + j * 78.233) * 43758.5453, 1.0f);
+ rand[j][i] = fmodf(r[i] * 2.0f - 1.0f + rand_offset, 1.0f);
+ rand[j][i] = fmodf(sin(rand[j][i] * 12.9898f + j * 78.233f) * 43758.5453f, 1.0f);
}
}
}