Skip to content

Commit

Permalink
Add string formater for position
Browse files Browse the repository at this point in the history
  • Loading branch information
vladamatena committed Apr 21, 2015
1 parent 6b94571 commit 20b0e2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jdeeco-core/src/cz/cuni/mff/d3s/jdeeco/position/Position.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ public double euclidDistanceTo(Position position) {
double dz = Math.abs(z - position.z);
return Math.sqrt(dx * dx + dy * dy + dz * dz);
}

@Override
public String toString() {
return String.format("[%.1fm, %.1fm, %.1fm]", x, y, z);
}
}

0 comments on commit 20b0e2e

Please sign in to comment.