From 554c776e08c9ee35fa9e2677e02f4005c11ddbc0 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 25 Feb 2021 09:54:50 -0500 Subject: Reformat structure string operators The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice) --- core/string/ustring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/string/ustring.h') diff --git a/core/string/ustring.h b/core/string/ustring.h index f05865165d..82cd3e1667 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -309,7 +309,7 @@ public: String unquote() const; static String num(double p_num, int p_decimals = -1); static String num_scientific(double p_num); - static String num_real(double p_num); + static String num_real(double p_num, bool p_trailing = true); static String num_int64(int64_t p_num, int base = 10, bool capitalize_hex = false); static String num_uint64(uint64_t p_num, int base = 10, bool capitalize_hex = false); static String chr(char32_t p_char); -- cgit v1.2.3