Skip to content
Snippets Groups Projects
Commit 87419f4a authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Refactored some code to avoid limitations of older Eclipses' debuggers.

parent 9fb7d0d8
Branches master
No related tags found
No related merge requests found
......@@ -48,7 +48,8 @@ public class SortFourPairs {
double y3 = readArgument(7, arguments);
double x4 = x0;
double y4 = y0;
switch (getPositionOfMinimum(x0, y0, x1, y1, x2, y2, x3, y3)) {
int firstPositionOfMinimum = getPositionOfMinimum(x0, y0, x1, y1, x2, y2, x3, y3);
switch (firstPositionOfMinimum) {
case 3:
x4 = x2;
x2 = x3;
......@@ -71,7 +72,8 @@ public class SortFourPairs {
y0 = y1;
y1 = y4;
}
switch (getPositionOfMinimum(Double.MAX_VALUE, Double.MAX_VALUE, x1, y1, x2, y2, x3, y3)) {
int secondPositionOfMinimum = getPositionOfMinimum(Double.MAX_VALUE, Double.MAX_VALUE, x1, y1, x2, y2, x3, y3);
switch (secondPositionOfMinimum) {
case 3:
x4 = x2;
x2 = x3;
......@@ -87,8 +89,9 @@ public class SortFourPairs {
y1 = y2;
y2 = y4;
}
switch (getPositionOfMinimum(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE, x2, y2, x3,
y3)) {
int thirdPositionOfMinimum = getPositionOfMinimum(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE,
Double.MAX_VALUE, x2, y2, x3, y3);
switch (thirdPositionOfMinimum) {
case 3:
x4 = x2;
x2 = x3;
......
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