[Freeciv-Dev] Re: amortize
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Thue Janus Kristensen wrote:
} in amortize, what does this mean?:
}
} if (denom > 1) {
} benefit = (benefit + (denom/2)) / denom;
} }
}
} more specifically, why doesn't it just say "benefit = benefit/denum" ?
It looks like it's rounding off the result to the nearest int - basically
the same as (int) ((float)benefit/denom + 0.5), but avoiding the floating
point.
Have fun,
Rob R.
\((/
~oo~
/))\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: amortize,
Robert Rendell <=
|
|