Rounding Rules

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
Post Reply
User avatar
Hampton
Posts: 3
Joined: Tue Jul 18, 2017 6:22 pm

Rounding Rules

Post by Hampton »

Okay, this has been bothering me for a while: when the resources a tile produces receives a multiplier that turns it into a decimal, does it round up, round down, or round to the nearest integer? If it's to the nearest integer, then what happens when the resource total is an integer plus one half?
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Rounding Rules

Post by cazfi »

Most things in freeciv get rounded toward zero.
Post Reply