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:
parent
802f69b039
commit
7a99405942
14 changed files with 35 additions and 35 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue