Class Distance2D_I32

java.lang.Object
georegression.metric.Distance2D_I32

public class Distance2D_I32 extends Object
  • Constructor Details

    • Distance2D_I32

      public Distance2D_I32()
  • Method Details

    • distance

      public static double distance(LineSegment2D_I32 line, Point2D_I32 p)

      Returns the distance the closest point on a line segment is from the specified point. The closest point is bounded to be along the line segment.

      Parameters:
      line - A line segment. Not modified.
      p - The point. Not modified.
      Returns:
      Distance the closest point on the line is away from the point.
    • distance

      public static double distance(LineParametric2D_I32 line, Point2D_I32 p)

      Returns the distance of a point to the closest point on a line.

      Parameters:
      line - A line. Not modified.
      p - The point. Not modified.
      Returns:
      Distance the closest point on the line is away from the point.
    • distanceSq

      public static double distanceSq(LineParametric2D_I32 line, Point2D_I32 p)

      Returns the squared distance of a point to the closest point on a line.

      Parameters:
      line - A line. Not modified.
      p - The point. Not modified.
      Returns:
      Distance the closest point on the line is away from the point.