Class Geometry


  • public class Geometry
    extends java.lang.Object
    Helper class for sum small computations.
    • Constructor Summary

      Constructors 
      Constructor Description
      Geometry()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double crossProduct​(Point2D p1, Point2D p2)  
      static double distancePointToSegment​(double x1, double y1, double x2, double y2, double x3, double y3)
      * Shortest Distance from a Point p3 to a line segment p1-p2 http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Geometry

        public Geometry()
    • Method Detail

      • crossProduct

        public static double crossProduct​(Point2D p1,
                                          Point2D p2)
      • distancePointToSegment

        public static double distancePointToSegment​(double x1,
                                                    double y1,
                                                    double x2,
                                                    double y2,
                                                    double x3,
                                                    double y3)
        * Shortest Distance from a Point p3 to a line segment p1-p2 http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/
        Parameters:
        x1 - x value of first segment point
        y1 - y value of first segment point
        x2 - x value of second segment point
        y2 - y value of second segment point
        x3 - x value of point we are interested in
        y3 - y value of point we are interested in
        Returns: