POLL: Should FP Calculations Round to the Nearest?

POLL: Currently all floating point calculations round down which causes many bonuses to disappear (e.g., a ship with attack 8 and attack bonus 10% stays attack 8 because 8.8 rounds down to 8)! Should floating point calculations round down or round off to the nearest?

p.s. To round off to the nearest the devs. would just need to add 0.5 before typecasting to integer.
9,663 views 11 replies
Reply #5 Top
Mascrinthus - what does it matter? Sorry I know it changes the calculations a lot. But in the grand scheme of things it doesn't seem that important - certainly not to bump the same unanswered thread 4 times. It works that way- get used to it

Reply #6 Top
If nobody has answered after three bumps... just give up already. Or take it as a 'no'.
Reply #7 Top
Thanks for bumping four times, must have read over this thread the first three bumps!

I second that, would be nice to have the game round correctly though it is a minor issue at all.
Reply #8 Top
It would be better, IMO. I've always wondered why they round everything down.
Reply #9 Top
Nitpick: as it stands, they are not being rounded down so much as truncated, which is very common practice (and in fact the only behavior when you say, perform division with two integers, as you get an integer result regardless of the remainder).
Reply #10 Top
I'd say yes, it should, but I don't care about it enough to make the developers search through the code for every place it casts something to an int and change it. But I wouldn't mind if they were going through the code anyway and changed that wherever they saw it.
Reply #11 Top
I agree this is not a major issue. My major complaints have already been addressed namely, "Social Waste", unbalanced "First Strike Advantage", and "AI Building too Many Embassies and Entertainment Center" (or so I'm told, I have not tried v1.2 yet). My nitpicking is a testament to the quality of GalCiv II.

Frogboy himself has pointed in his posts that rounding down renders bonuses to small values useless. It is a simple change but would be a lot of work because it would have to be made in many places. Hopefully, Stardock will keep this in mind with their future development projects.