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>2011-03-27 17:49:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 17:49:53 +0400
commit9997c3c8951fb253fa5e37b624b81005202ceb6d (patch)
tree5eaa8171f5d0cca14126dfa1107abb2fa6ec36b1 /source/blender/modifiers/intern/MOD_wave.c
parent3cb6f52eec3beae54adcec64e1213995dfac0423 (diff)
modifiers: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_wave.c')
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index b4e94157e9a..6d547867ed8 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -286,7 +286,7 @@ static void waveModifier_do(WaveModifierData *md,
if(wmd->damp == 0) wmd->damp = 10.0f;
- if(wmd->lifetime != 0.0) {
+ if(wmd->lifetime != 0.0f) {
float x = ctime - wmd->timeoffs;
if(x > wmd->lifetime) {
@@ -294,7 +294,7 @@ static void waveModifier_do(WaveModifierData *md,
if(lifefac > wmd->damp) lifefac = 0.0;
else lifefac =
- (float)(wmd->height * (1.0 - sqrt(lifefac / wmd->damp)));
+ (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp)));
}
}
@@ -304,9 +304,9 @@ static void waveModifier_do(WaveModifierData *md,
wavemod_get_texture_coords(wmd, ob, dm, vertexCos, tex_co, numVerts);
}
- if(lifefac != 0.0) {
+ if(lifefac != 0.0f) {
/* avoid divide by zero checks within the loop */
- float falloff_inv= wmd->falloff ? 1.0f / wmd->falloff : 1.0;
+ float falloff_inv= wmd->falloff ? 1.0f / wmd->falloff : 1.0f;
int i;
for(i = 0; i < numVerts; i++) {
@@ -364,14 +364,14 @@ static void waveModifier_do(WaveModifierData *md,
amplit -= (ctime - wmd->timeoffs) * wmd->speed;
if(wmd->flag & MOD_WAVE_CYCL) {
- amplit = (float)fmod(amplit - wmd->width, 2.0 * wmd->width)
+ amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width)
+ wmd->width;
}
/* GAUSSIAN */
if(amplit > -wmd->width && amplit < wmd->width) {
amplit = amplit * wmd->narrow;
- amplit = (float)(1.0 / exp(amplit * amplit) - minfac);
+ amplit = (float)(1.0f / expf(amplit * amplit) - minfac);
/*apply texture*/
if(wmd->texture)