Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
apparently you cannot overload methods in java script fun fact
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 8, 2015
1 parent b269dd5 commit 971a6d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions main/CompGeo.pde
Expand Up @@ -52,7 +52,7 @@ public static class CompGeo {
else { return true; }
}

public static float signedArea(HalfEdge h) {
public static float signedAreaHE(HalfEdge h) {
return signedArea(h.getPointsNext());
}

Expand Down Expand Up @@ -127,7 +127,7 @@ public static class CompGeo {

public static HalfEdge findSuperTightBoundary(HalfEdge inner, HalfEdge outer, Point far) {
if (outer == null) { return null; }
if ((isContained(inner, outer, far)) && (signedArea(outer) < 0)) { return outer; }
if ((isContained(inner, outer, far)) && (signedAreaHE(outer) < 0)) { return outer; }
if (outer.getCounted() == false) {
outer.setCounted(true);
HalfEdge temp = findSuperTightBoundary(inner, outer.getnext(), far);
Expand All @@ -147,7 +147,7 @@ public static class CompGeo {
}

private static HalfEdge findClockWiseRepresentation(HalfEdge ref) {
if (signedArea(ref) >= 0) { return ref; }
if (signedAreaHE(ref) >= 0) { return ref; }
if (ref.getCounted() == false) {
ref.setCounted(true);
HalfEdge temp = findClockWiseRepresentation(ref.getnext());
Expand Down
4 changes: 2 additions & 2 deletions main/Face.pde
Expand Up @@ -4,7 +4,7 @@ public class Face {
ArrayList<HalfEdge> innerComponents;

public Face(HalfEdge ref, PointList points) {
if (CompGeo.signedArea(ref) < 0) { outerComponent = ref; }
if (CompGeo.signedAreaHE(ref) < 0) { outerComponent = ref; }
else { outerComponent = CompGeo.findTightOuterBoundary(ref, points); }
innerComponents = CompGeo.findFriends(outerComponent, points);
}
Expand Down Expand Up @@ -39,7 +39,7 @@ public class Face {
}

public boolean inAnInner(HalfEdge inner, Point a, PointList pl) {
if (CompGeo.signedArea(inner) == 0) { return false; }
if (CompGeo.signedAreaHE(inner) == 0) { return false; }
if (CompGeo.inside(inner, a, pl.getFar())) { return true; }
return false;
}
Expand Down

0 comments on commit 971a6d7

Please sign in to comment.