Do not cast to float where usual arithmetic conversions obviously

convert the cast's result to double.  Such casts are ugly and may lose
precision.
This commit is contained in:
Markus Armbruster 2006-05-06 08:26:31 +00:00
parent 802f69b039
commit 7a99405942
14 changed files with 35 additions and 35 deletions

View file

@ -265,7 +265,7 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
pln_identchance(pp, shp_hardtarget(targ), EF_SHIP))
continue;
pingrange = MAX(targ->shp_visib, 10) * range / 10;
vrange = ((float)pingrange) * ((float)pp->pln_effic / 200.0);
vrange = pingrange * (pp->pln_effic / 200.0);
dist = mapdist(targ->shp_x, targ->shp_y, x, y);
pingrange = (MAX(pingrange, 2) * targ->shp_effic);
pingrange = roundavg(pingrange / 100.0);