summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-03-26 17:04:14 +0100
committerkobewi <kobewi4e@gmail.com>2024-10-23 15:00:21 +0200
commit5c0f2414cd6d988a4eab93fc21bc3b80388907e8 (patch)
tree05d11ea1b6d97b2cb8e2e203dba1ffb89dc70eb5 /core/math
parent533c616cb86ff7bb940d58ffbbcc1a3eca0aa33d (diff)
downloadredot-engine-5c0f2414cd6d988a4eab93fc21bc3b80388907e8.tar.gz
Always add decimal when printing float
Diffstat (limited to 'core/math')
-rw-r--r--core/math/rect2.cpp2
-rw-r--r--core/math/vector2.cpp2
-rw-r--r--core/math/vector3.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/math/rect2.cpp b/core/math/rect2.cpp
index c55226a57e..7f77b0786c 100644
--- a/core/math/rect2.cpp
+++ b/core/math/rect2.cpp
@@ -283,7 +283,7 @@ next4:
}
Rect2::operator String() const {
- return "[P: " + position.operator String() + ", S: " + size + "]";
+ return "[P: " + position.operator String() + ", S: " + size.operator String() + "]";
}
Rect2::operator Rect2i() const {
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index e86b97d6a8..0590ee8a37 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -203,7 +203,7 @@ bool Vector2::is_finite() const {
}
Vector2::operator String() const {
- return "(" + String::num_real(x, false) + ", " + String::num_real(y, false) + ")";
+ return "(" + String::num_real(x, true) + ", " + String::num_real(y, true) + ")";
}
Vector2::operator Vector2i() const {
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 1e90002665..e18ac3b011 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -165,7 +165,7 @@ bool Vector3::is_finite() const {
}
Vector3::operator String() const {
- return "(" + String::num_real(x, false) + ", " + String::num_real(y, false) + ", " + String::num_real(z, false) + ")";
+ return "(" + String::num_real(x, true) + ", " + String::num_real(y, true) + ", " + String::num_real(z, true) + ")";
}
Vector3::operator Vector3i() const {