diff options
author | Hop311 <Hop3114@gmail.com> | 2024-08-30 23:29:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 23:29:57 +0200 |
commit | f54e454afb90f8868e7c62529e2a388fdaadf20b (patch) | |
tree | f19dbcdfe613397e86dc52cc34e0a443bd0f3e96 /extension/src/openvic-extension/utility/Utilities.hpp | |
parent | 855e5b087459da19caf230cf22d99462680b268e (diff) | |
parent | d7672f406406eea46625bc725690651f28211e19 (diff) |
Merge pull request #251 from OpenVicProject/gui-text-label
Add GUILabel (colour code + currency icon support)
Diffstat (limited to 'extension/src/openvic-extension/utility/Utilities.hpp')
-rw-r--r-- | extension/src/openvic-extension/utility/Utilities.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.hpp b/extension/src/openvic-extension/utility/Utilities.hpp index 49314ca..48be1e0 100644 --- a/extension/src/openvic-extension/utility/Utilities.hpp +++ b/extension/src/openvic-extension/utility/Utilities.hpp @@ -27,6 +27,9 @@ namespace OpenVic::Utilities { godot::String float_to_string_dp(float val, int32_t decimal_places); + // 3dp if abs(val) < 2 else 2dp if abs(val) < 10 else 1dp + godot::String float_to_string_dp_dynamic(float val); + constexpr real_t to_real_t(std::floating_point auto val) { return static_cast<real_t>(val); } |