From f2f48aaf36507bb1ade6261905296bfd560e921d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 22 Nov 2024 21:25:32 +0100 Subject: Fix stringification of Projection --- core/math/projection.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'core/math') diff --git a/core/math/projection.cpp b/core/math/projection.cpp index 4a0faef08f..20638826a6 100644 --- a/core/math/projection.cpp +++ b/core/math/projection.cpp @@ -912,14 +912,10 @@ void Projection::set_light_atlas_rect(const Rect2 &p_rect) { } Projection::operator String() const { - String str; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - str += String((j > 0) ? ", " : "\n") + rtos(columns[i][j]); - } - } - - return str; + return "[X: " + columns[0].operator String() + + ", Y: " + columns[1].operator String() + + ", Z: " + columns[2].operator String() + + ", W: " + columns[3].operator String() + "]"; } real_t Projection::get_aspect() const { -- cgit v1.2.3