diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-31 09:23:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-31 17:17:21 +0300 |
commit | 9e9cd77b8de68015a98659671272cc9d78710e69 (patch) | |
tree | a705baa2b3d4c2667085815c865a826c1f884173 /source/blender/physics | |
parent | 535de7ec1fee94eae1769630b512c6ef4eb5bcad (diff) |
Compiler warning: double-promotion
Diffstat (limited to 'source/blender/physics')
-rw-r--r-- | source/blender/physics/intern/implicit_blender.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c index cdc3bda3b11..e6ba55ab605 100644 --- a/source/blender/physics/intern/implicit_blender.c +++ b/source/blender/physics/intern/implicit_blender.c @@ -941,7 +941,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, result->status = conjgrad_loopcount < conjgrad_looplimit ? BPH_SOLVER_SUCCESS : BPH_SOLVER_NO_CONVERGENCE; result->iterations = conjgrad_loopcount; - result->error = bnorm2 > 0.0f ? sqrt(delta_new / bnorm2) : 0.0f; + result->error = bnorm2 > 0.0f ? sqrtf(delta_new / bnorm2) : 0.0f; return conjgrad_loopcount < conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable } @@ -1470,8 +1470,8 @@ static void edge_wind_vertex(const float dir[3], float length, float radius, con /* angle of wind direction to edge */ cos_alpha = dot_v3v3(wind, dir) / windlen; - sin_alpha = sqrt(1.0 - cos_alpha*cos_alpha); - cross_section = radius * (M_PI * radius * sin_alpha + length * cos_alpha); + sin_alpha = sqrtf(1.0f - cos_alpha * cos_alpha); + cross_section = radius * ((float)M_PI * radius * sin_alpha + length * cos_alpha); mul_v3_v3fl(f, wind, density * cross_section); } |