diff options
author | Hop311 <Hop3114@gmail.com> | 2024-02-24 23:07:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 23:07:24 +0100 |
commit | 9e305db5e5090a1a24979c480d64eebfe2de65da (patch) | |
tree | 487fea19d42106c08b60f5bba99bc76485073002 /extension/src/openvic-extension/utility/Utilities.cpp | |
parent | 5d7c6eafe35e2c6e952bc0b3f91d27d760c8e75e (diff) | |
parent | 843edde55306e3fbdb5e37ef9b7c09c7b53f50c4 (diff) |
Merge pull request #209 from OpenVicProject/scrollbar
Added GUIScrollbar and GFXCorneredTileSupportingTexture
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); } |