mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Prettier str() for some math types
This commit is contained in:
parent
6273ec901f
commit
eefca1ada9
5 changed files with 17 additions and 10 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue