Rounding Rules

Web version of freeciv at
User avatar
Posts: 3
Joined: Tue Jul 18, 2017 6:22 pm

Rounding Rules

Postby Hampton » Thu Jul 20, 2017 7:00 pm

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?

Posts: 1875
Joined: Tue Jan 29, 2013 6:54 pm

Re: Rounding Rules

Postby cazfi » Thu Jul 20, 2017 7:24 pm

Most things in freeciv get rounded toward zero.