Skip to content
Snippets Groups Projects
Commit 725f5cf8 authored by terry-norbraten's avatar terry-norbraten
Browse files

lessen object creation in loops

parent ae923b8d
No related branches found
No related tags found
No related merge requests found
...@@ -161,6 +161,14 @@ public class X3dCreateInterpolators { ...@@ -161,6 +161,14 @@ public class X3dCreateInterpolators {
Map<Double, String> keyKeyValueSetOrientationInterpolatorX = new LinkedHashMap<>(); Map<Double, String> keyKeyValueSetOrientationInterpolatorX = new LinkedHashMap<>();
Map<Double, String> keyKeyValueSetOrientationInterpolatorY = new LinkedHashMap<>(); Map<Double, String> keyKeyValueSetOrientationInterpolatorY = new LinkedHashMap<>();
Map<Double, String> keyKeyValueSetOrientationInterpolatorZ = new LinkedHashMap<>(); Map<Double, String> keyKeyValueSetOrientationInterpolatorZ = new LinkedHashMap<>();
double tempX;
double tempY;
double tempZ ;
double tempPhi;
double tempPsi;
double tempTheta;
for (Double k : keys) { for (Double k : keys) {
...@@ -169,13 +177,13 @@ public class X3dCreateInterpolators { ...@@ -169,13 +177,13 @@ public class X3dCreateInterpolators {
String localOrientationStringY; String localOrientationStringY;
String localOrientationStringZ; String localOrientationStringZ;
double tempX = returnMap.get(k).getX(); tempX = returnMap.get(k).getX();
double tempY = returnMap.get(k).getY(); tempY = returnMap.get(k).getY();
double tempZ = returnMap.get(k).getZ(); tempZ = returnMap.get(k).getZ();
double tempPhi = returnMap.get(k).getPhi() / 6.28; tempPhi = returnMap.get(k).getPhi() / 6.28;
double tempPsi = returnMap.get(k).getPsi() / 6.28; tempPsi = returnMap.get(k).getPsi() / 6.28;
double tempTheta = returnMap.get(k).getTheta() / 6.28; tempTheta = returnMap.get(k).getTheta() / 6.28;
localCoordinateString = " " + coordinateNumberFormat.format(tempX) + " " + coordinateNumberFormat.format(tempY) + " " + coordinateNumberFormat.format(tempZ); localCoordinateString = " " + coordinateNumberFormat.format(tempX) + " " + coordinateNumberFormat.format(tempY) + " " + coordinateNumberFormat.format(tempZ);
localOrientationStringX = " 1 0 0 " + coordinateNumberFormat.format(tempPhi); localOrientationStringX = " 1 0 0 " + coordinateNumberFormat.format(tempPhi);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment