Class MinDist2D


  • public class MinDist2D
    extends Object
    Class that can calculate the MINDIST between a point and a rectangle
    • Method Detail

      • get

        public static double get​(double minx,
                                 double miny,
                                 double maxx,
                                 double maxy,
                                 double x,
                                 double y)
        Calculate the MINDIST between the given rectangle and the given point
        Parameters:
        minx - the rectangle minimum x point
        miny - the rectangle minimum y point
        maxx - the rectangle maximum x point
        maxy - the rectangle maximum y point
        x - the point
        y - the point
        Returns:
        the squared distance