* Convert value from OpenTTD's internal unit into the displayed value. * @param input The input to convert. * @param round Whether to round the value or not. * @return The converted value. */
| 816 | * @return The converted value. |
| 817 | */ |
| 818 | int64_t ToDisplay(int64_t input, bool round = true) const |
| 819 | { |
| 820 | return round |
| 821 | ? (int64_t)std::round(input * this->factor) |
| 822 | : (int64_t)(input * this->factor); |
| 823 | } |
| 824 | |
| 825 | /** |
| 826 | * Convert the displayed value back into a value of OpenTTD's internal unit. |
no outgoing calls
no test coverage detected