Skip to content

Commit

Permalink
Describer: specify ROOT locale for String.format()
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Oct 11, 2023
1 parent fdebd48 commit a10a80a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions HeartLibrary/src/main/java/jme3utilities/debug/Describer.java
Original file line number Diff line number Diff line change
Expand Up @@ -784,18 +784,18 @@ public String describeUserData(Spatial spatial) {
*/
public String describeVertexData(Mesh mesh, int vertexIndex) {
StringBuilder builder = new StringBuilder(80);
String desc;

String format;
int numVertices = mesh.getVertexCount();
if (numVertices <= 10) {
desc = String.format("v%1d: ", vertexIndex);
format = "v%1d: ";
} else if (numVertices <= 100) {
desc = String.format("v%02d: ", vertexIndex);
format = "v%02d: ";
} else if (numVertices <= 1000) {
desc = String.format("v%03d: ", vertexIndex);
format = "v%03d: ";
} else {
desc = String.format("v%04d: ", vertexIndex);
format = "v%04d: ";
}
String desc = String.format(Locale.ROOT, format, vertexIndex);
builder.append(desc);

int length = builder.length();
Expand Down

0 comments on commit a10a80a

Please sign in to comment.