File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
tool/sdg/src/main/java/org/openscience/cdk/layout Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 4545import java .io .OutputStream ;
4646import java .io .OutputStreamWriter ;
4747import java .text .DecimalFormat ;
48- import java .text .DecimalFormatSymbols ;
4948import java .util .ArrayList ;
5049import java .util .Collection ;
5150import java .util .Collections ;
8584 */
8685final class IdentityTemplateLibrary {
8786
88- private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat (".##" , DecimalFormatSymbols .getInstance (Locale .ROOT ));
89-
9087 private final Multimap <String , Point2d []> templateMap = LinkedListMultimap .create ();
9188
9289 private final SmilesGenerator smigen = SmilesGenerator .unique ();
@@ -297,9 +294,10 @@ static String encodeCoordinates(Point2d[] points) {
297294 sb .append ("|(" );
298295 for (Point2d point : points ) {
299296 if (sb .length () > 2 ) sb .append (";" );
300- sb .append (DECIMAL_FORMAT .format (point .x ));
297+ DecimalFormat fmt ;
298+ sb .append (String .format (Locale .ROOT , "%.5f" , point .x ));
301299 sb .append (',' );
302- sb .append (DECIMAL_FORMAT .format (point .y ));
300+ sb .append (String .format (Locale . ROOT , "%.5f" , point .y ));
303301 sb .append (',' );
304302 }
305303 sb .append (")|" );
You can’t perform that action at this time.
0 commit comments