Skip to content

Commit

Permalink
Better string versions
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Jul 1, 2023
1 parent d102683 commit 4562fd8
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector2d{" +
"x=" + this.x +
", y=" + this.y +
'}';
return String.format("%f, %f", this.x, this.y);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector2f{" +
"x=" + this.x +
", y=" + this.y +
'}';
return String.format("%f, %f", this.x, this.y);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector2i{" +
"x=" + this.x +
", y=" + this.y +
'}';
return String.format("%d, %d", this.x, this.y);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
'}';
return String.format("%f, %f, %f", this.x, this.y, this.z);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
'}';
return String.format("%f, %f, %f", this.x, this.y, this.z);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
'}';
return String.format("%d, %d, %d", this.x, this.y, this.z);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
", w=" + this.w +
'}';
return String.format("%f, %f, %f, %f", this.x, this.y, this.z, this.w);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
", w=" + this.w +
'}';
return String.format("%f, %f, %f, %f", this.x, this.y, this.z, this.w);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,7 @@ public int hashCode() {

@Override
public String toString() {
return "Vector4i{" +
"x=" + this.x +
", y=" + this.y +
", z=" + this.z +
", w=" + this.w +
'}';
return String.format("%d, %d, %d, %d", this.x, this.y, this.z, this.w);
}

@Override
Expand Down

0 comments on commit 4562fd8

Please sign in to comment.