diff options
| author | Ignacio Etcheverry | 2016-07-26 17:19:49 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry | 2016-07-27 17:00:07 +0200 |
| commit | eefca1ada97a6bc5db38936d23da323a78b2044d (patch) | |
| tree | 87d01d1fc9cc5a7ba2d11618bc99e751247be8e5 /core/math/matrix3.cpp | |
| parent | 6273ec901faec2823c8f4801244d1cffbbe9b118 (diff) | |
| download | godot-eefca1ada97a6bc5db38936d23da323a78b2044d.tar.gz godot-eefca1ada97a6bc5db38936d23da323a78b2044d.tar.zst godot-eefca1ada97a6bc5db38936d23da323a78b2044d.zip | |
Prettier str() for some math types
Diffstat (limited to 'core/math/matrix3.cpp')
| -rw-r--r-- | core/math/matrix3.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp index 71e6b6221..7b811c245 100644 --- a/core/math/matrix3.cpp +++ b/core/math/matrix3.cpp @@ -233,19 +233,26 @@ bool Matrix3::operator!=(const Matrix3& p_matrix) const { Matrix3::operator String() const { - String mtx; + String mtx("("); for (int i=0;i<3;i++) { + if (i!=0) + mtx+=", "; + + mtx+="("; + for (int j=0;j<3;j++) { - if (i!=0 || j!=0) + if (j!=0) mtx+=", "; mtx+=rtos( elements[i][j] ); } + + mtx+=")"; } - return mtx; + return mtx+")"; } Matrix3::operator Quat() const { |
