diff options
author | hop311 <hop3114@gmail.com> | 2024-02-24 14:17:07 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-02-24 14:17:07 +0100 |
commit | 843edde55306e3fbdb5e37ef9b7c09c7b53f50c4 (patch) | |
tree | 487fea19d42106c08b60f5bba99bc76485073002 /extension/src/openvic-extension/utility/Utilities.cpp | |
parent | 5d7c6eafe35e2c6e952bc0b3f91d27d760c8e75e (diff) |
Added GUIScrollbar and GFXCorneredTileSupportingTexturescrollbar
Diffstat (limited to 'extension/src/openvic-extension/utility/Utilities.cpp')
-rw-r--r-- | extension/src/openvic-extension/utility/Utilities.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.cpp b/extension/src/openvic-extension/utility/Utilities.cpp index 5957b70..7450212 100644 --- a/extension/src/openvic-extension/utility/Utilities.cpp +++ b/extension/src/openvic-extension/utility/Utilities.cpp @@ -36,9 +36,8 @@ String Utilities::int_to_formatted_string(int64_t val) { return (negative ? "-" : "") + String::num_int64(val); } -/* Float to formatted to 4 decimal place string. */ -String Utilities::float_to_formatted_string(float val) { - static constexpr int64_t decimal_places = 4; +/* Float to string formatted with the specified number of decimal places. */ +String Utilities::float_to_formatted_string(float val, int32_t decimal_places) { return String::num(val, decimal_places).pad_decimals(decimal_places); } |