AB3: BodyForceTreeMap working

This commit is contained in:
2022-03-31 21:47:53 +02:00
parent 9925835a1e
commit 01b2fb8989
5 changed files with 126 additions and 10 deletions

View File

@ -94,6 +94,15 @@ public class Vector3 {
* in the form "[x,y,z]", e.g., "[1.48E11,0.0,0.0]".
*/
public String toString() {
return String.format("[%f,%f,%f]", x, y, z);
return String.format("[%g,%g,%g]", x, y, z);
}
@Override
public boolean equals(Object other) {
if (other.getClass() != Vector3.class) {
return false;
}
Vector3 v = (Vector3) other;
return this.x == v.x && this.y == v.y && this.z == v.z;
}
}