From 9e9cd77b8de68015a98659671272cc9d78710e69 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Jan 2015 17:23:30 +1100 Subject: Compiler warning: double-promotion --- source/blender/physics/intern/implicit_blender.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/physics') 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); } -- cgit v1.2.3