News:

SimuTranslator
Make Simutrans speak your language.

After the decimal point on chart always shows .00

Started by RESTRICTED ACCOUNT, January 30, 2020, 09:32:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

It is weird that the decimals are always 0 in charts, even though other dialogs displayed the decimals correctly.
It looks like the data in the chart and other dialogs are inconsistent.

So I was looking at the gui_chart.cc,
if the chart type is money, divide sint64 by 100, then assign to another sint64 and convert it to double. Therefore, two decimal places have been truncated.
In this case, there is no point in displaying decimal places.

Phystam

Probably we have to convert sint64 to double, and divide it by 100.

prissi