* Convert the displayed value back into a value of OpenTTD's internal unit. * @param input The input to convert. * @param round Whether to round the value up or not. * @param divider Divide the return value by this. * @return The converted value. */
| 830 | * @return The converted value. |
| 831 | */ |
| 832 | int64_t FromDisplay(int64_t input, bool round = true, int64_t divider = 1) const |
| 833 | { |
| 834 | return round |
| 835 | ? (int64_t)std::round(input / this->factor / divider) |
| 836 | : (int64_t)(input / this->factor / divider); |
| 837 | } |
| 838 | }; |
| 839 | |
| 840 | /** Information about a specific unit system. */ |
no outgoing calls
no test coverage detected