summaryrefslogtreecommitdiffstats
path: root/Polygon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Polygon.cpp')
-rw-r--r--Polygon.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Polygon.cpp b/Polygon.cpp
index 8b32bb4..650fbb0 100644
--- a/Polygon.cpp
+++ b/Polygon.cpp
@@ -17,12 +17,6 @@ float Polygon::signedArea() const {
return d/2;
}
-Polygon::Direction Polygon::getDirection() const {
- float area = signedArea();
-
- return (area > 0) ? Triangle::CW : (area < 0) ? Triangle::CCW : Triangle::UNKNOWN;
-}
-
float Polygon::area() const {
return fabsf(signedArea());
}
@@ -170,6 +164,12 @@ bool Polygon::intersections(std::vector<Intersection> *intersections) const {
return ret;
}
+Polygon::Direction Polygon::getDirection() const {
+ float area = signedArea();
+
+ return (area > 0) ? Triangle::CW : (area < 0) ? Triangle::CCW : Triangle::UNKNOWN;
+}
+
bool Polygon::isSimple() const {
return !intersections();
}