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

@ -345,7 +345,7 @@ shiprepair(struct shpstr *ship, struct natstr *np,
if (left > delta)
left = delta;
leftp = ((float)left / 100.0);
leftp = left / 100.0;
memset(mvec, 0, sizeof(mvec));
mvec[I_LCM] = lcm_needed = ldround(mp->m_lcm * leftp, 1);
mvec[I_HCM] = hcm_needed = ldround(mp->m_hcm * leftp, 1);