java.lang.Object
org.jhotdraw8.geom.ConvexHull
Provides utility methods for computing the convex hull from a set of points.
- Author:
- Werner Randelshofer
-
Method Summary
Modifier and TypeMethodDescriptionstatic Point2D.Double[]getConvexHull2D(@NonNull Point2D.Double[] points) Computes the convex hull from a set of points.static @NonNull List<Point2D.Double> getConvexHull2D(@NonNull List<Point2D.Double> points) Computes the convex hull from a set of points.static booleanReturns true, if the three given points make a right turn.
-
Method Details
-
getConvexHull2D
Computes the convex hull from a set of points.- Parameters:
points- the points- Returns:
- convex hull of the points
-
getConvexHull2D
Computes the convex hull from a set of points.- Parameters:
points- the points- Returns:
- convex hull of the points
-
isRightTurn2D
public static boolean isRightTurn2D(@NonNull Point2D.Double p1, @NonNull Point2D.Double p2, @NonNull Point2D.Double p3) Returns true, if the three given points make a right turn.- Parameters:
p1- first pointp2- second pointp3- third point- Returns:
- true if right turn.
-