+
+ //////// Debug section
+ /*
+ * Debugging info. If openrocket.debug.coordinatecount is defined, a line is
+ * printed every 1000000 instantiations (or as many as defined).
+ */
+ private static final boolean COUNT_DEBUG;
+ private static final int COUNT_DIFF;
+ static {
+ String str = System.getProperty("openrocket.debug.coordinatecount", null);
+ int diff = 0;
+ if (str == null) {
+ COUNT_DEBUG = false;
+ COUNT_DIFF = 0;
+ } else {
+ COUNT_DEBUG = true;
+ try {
+ diff = Integer.parseInt(str);
+ } catch (NumberFormatException ignore) { }
+ if (diff < 1000)
+ diff = 1000000;
+ COUNT_DIFF = diff;
+ }
+ }
+
+ private static int count = 0;
+ {
+ // Debug count
+ if (COUNT_DEBUG) {
+ count++;
+ if ((count % COUNT_DIFF) == 0) {
+ System.out.println("Coordinate instantiated " + count + " times.");
+ }
+ }
+ }
+
+ //////// End debug section
+
+
+
+