aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/math')
-rwxr-xr-xsrc/jogl/classes/com/jogamp/graph/math/VectorUtil.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
index aae7a8c5c..b91969745 100755
--- a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
+++ b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
@@ -310,7 +310,7 @@ public class VectorUtil {
/** Computes the area of a list of vertices to check if ccw
* @param vertices
- * @return positve area if ccw else negative area value
+ * @return positive area if ccw else negative area value
*/
public static float area(ArrayList<Vertex> vertices) {
int n = vertices.size();
@@ -323,4 +323,7 @@ public class VectorUtil {
}
return area;
}
+ public static Winding getWinding(ArrayList<Vertex> vertices) {
+ return area(vertices) >= 0 ? Winding.CCW : Winding.CW ;
+ }
}