Class Rectangle

java.lang.Object
com.irurueta.geometry.Rectangle
All Implemented Interfaces:
Serializable

public class Rectangle extends Object implements Serializable
This class defines a 2D rectangle aligned with the horizontal and vertical axes. A rectangle is defined by two corners (top-left and bottom-right). Notice that vertical coordinates are defined from bottom to top, hence, top is a larger value than bottom.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Point2D
    Bottom right coordinate of rectangle.
    static final double
    Constant defining default threshold value used when none is provided.
    private Point2D
    Top left coordinate of rectangle.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor.
    Rectangle(double left, double top, double right, double bottom)
    Constructor with boundaries.
    Constructor from 2D box.
    Rectangle(Point2D topLeft, Point2D bottomRight)
    Constructor with boundaries.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    closestPoint(double x, double y, double left, double top, double right, double bottom, Point2D result)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
    void
    closestPoint(double x, double y, Point2D result)
    Gets closest point in this rectangle locus.
    static void
    closestPoint(double x, double y, Point2D center, double width, double height, Point2D result)
    Gets closest point in the rectangle locus defined by provided center and rectangle size.
    static void
    closestPoint(double x, double y, Point2D topLeft, Point2D bottomRight, Point2D result)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
    static void
    closestPoint(Point2D point, double left, double top, double right, double bottom, Point2D result)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
    void
    closestPoint(Point2D point, Point2D result)
    Gets closest point in this rectangle locus.
    static void
    closestPoint(Point2D point, Point2D center, double width, double height, Point2D result)
    Gets closest point in the rectangle locus defined by provided center rectangle size.
    static void
    closestPoint(Point2D point, Point2D topLeft, Point2D bottomRight, Point2D result)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
    final void
    Sets values of this rectangle from provided 2D box.
    double
    Gets area of this rectangle.
    static double
    getArea(double width, double height)
    Gets area of the rectangle having provided width and height values.
    static double
    getArea(double left, double top, double right, double bottom)
    Gets area of the rectangle defined by provided corner coordinates.
    static double
    getArea(Point2D topLeft, Point2D bottomRight)
    Gets area of the rectangle defined by provided top-left and bottom-right corners.
    Gets bottom-right corner.
    Gets center of rectangle.
    static Point2D
    getCenter(double left, double top, double right, double bottom)
    Gets center of rectangle.
    static void
    getCenter(double left, double top, double right, double bottom, Point2D result)
    Gets center of rectangle.
    void
    Gets center of rectangle.
    static Point2D
    getCenter(Point2D topLeft, Point2D bottomRight)
    Gets center of rectangle.
    static void
    getCenter(Point2D topLeft, Point2D bottomRight, Point2D result)
    Gets center of rectangle.
    getClosestPoint(double x, double y)
    Gets closest point in this rectangle locus to provided point coordinates.
    static Point2D
    getClosestPoint(double x, double y, double left, double top, double right, double bottom)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
    static Point2D
    getClosestPoint(double x, double y, Point2D center, double width, double height)
    Gets closest point in the rectangle locus defined by provided center and rectangle size to provided point.
    static Point2D
    getClosestPoint(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
    Gets closest point in this rectangle locus to provided point.
    static Point2D
    getClosestPoint(Point2D point, double left, double top, double right, double bottom)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
    static Point2D
    getClosestPoint(Point2D point, Point2D center, double width, double height)
    Gets closest point in the rectangle locus defined by provided center and rectangle size to provided point.
    static Point2D
    getClosestPoint(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
    double
    getDistance(double x, double y)
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(double x, double y, double left, double top, double right, double bottom)
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(double x, double y, Point2D center, double width, double height)
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the rectangle locus.
    double
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(Point2D point, double left, double top, double right, double bottom)
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(Point2D point, Point2D center, double width, double height)
    Gets distance to the closest point in the rectangle locus.
    static double
    getDistance(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the rectangle locus.
    double
    getDistanceToBottomSide(double x, double y)
    Gets distance to the closest point in the bottom border of this rectangle.
    static double
    getDistanceToBottomSide(double x, double y, double left, double top, double right, double bottom)
    Gets distance to the closest point in the bottom border of the rectangle.
    static double
    getDistanceToBottomSide(double x, double y, Point2D center, double width, double height)
    Gets distance to the closest point in the bottom border of the rectangle.
    static double
    getDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the bottom border of the rectangle.
    double
    Gets distance to the closest point in the bottom border of this rectangle.
    static double
    getDistanceToBottomSide(Point2D point, double left, double top, double right, double bottom)
    Gets distance to the closest point in the bottom border of the rectangle.
    static double
    getDistanceToBottomSide(Point2D point, Point2D center, double width, double height)
    Gets distance to the closest point in the bottom border of the rectangle.
    static double
    getDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the bottom border of the rectangle.
    double
    getDistanceToLeftSide(double x, double y)
    Gets distance to the closest point in the left border of this rectangle.
    static double
    getDistanceToLeftSide(double x, double y, double left, double top, double right, double bottom)
    Gets distance to the closest point in the left border of the rectangle.
    static double
    getDistanceToLeftSide(double x, double y, Point2D center, double width, double height)
    Gets distance to the closest point in the left border of the rectangle.
    static double
    getDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the left border of the rectangle.
    double
    Gets distance to the closest point in the left border of this rectangle.
    static double
    getDistanceToLeftSide(Point2D point, double left, double top, double right, double bottom)
    Gets distance to the closest point in the left border of the rectangle.
    static double
    getDistanceToLeftSide(Point2D point, Point2D center, double width, double height)
    Gets distance to the closest point in the left border of the rectangle.
    static double
    getDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the left border of the rectangle.
    double
    getDistanceToRightSide(double x, double y)
    Gets distance to the closest point in the right border of this rectangle.
    static double
    getDistanceToRightSide(double x, double y, double left, double top, double right, double bottom)
    Gets distance to the closest point in the right border of the rectangle.
    static double
    getDistanceToRightSide(double x, double y, Point2D center, double width, double height)
    Gets distance to the closest point in the right border of the rectangle.
    static double
    getDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the right border of the rectangle.
    double
    Gets distance to the closest point in the right border of this rectangle.
    static double
    getDistanceToRightSide(Point2D point, double left, double top, double right, double bottom)
    Gets distance to the closest point in the right border of the rectangle.
    static double
    getDistanceToRightSide(Point2D point, Point2D center, double width, double height)
    Gets distance to the closest point in the right border of the rectangle.
    static double
    getDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the right border of the rectangle.
    double
    getDistanceToTopSide(double x, double y)
    Gets distance to the closest point in the top border of this rectangle.
    static double
    getDistanceToTopSide(double x, double y, double left, double top, double right, double bottom)
    Gets distance to the closest point in the top border of the rectangle.
    static double
    getDistanceToTopSide(double x, double y, Point2D center, double width, double height)
    Gets distance to the closest point in the top border of the rectangle.
    static double
    getDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the top border of the rectangle.
    double
    Gets distance to the closest point in the top border of this rectangle.
    static double
    getDistanceToTopSide(Point2D point, double left, double top, double right, double bottom)
    Gets distance to the closest point in the top border of the rectangle.
    static double
    getDistanceToTopSide(Point2D point, Point2D center, double width, double height)
    Gets distance to the closest point in the top border of the rectangle.
    static double
    getDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets distance to the closest point in the top border of the rectangle.
    double
    Gets height of this rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.
    static double
    getHeight(Point2D topLeft, Point2D bottomRight)
    Gets height of a rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.
    double
    Gets perimeter of this rectangle.
    static double
    getPerimeter(double width, double height)
    Gets perimeter of a rectangle having provided width and height.
    static double
    getPerimeter(double left, double top, double right, double bottom)
    Gets perimeter of a rectangle having provided top-left and bottom-right corners.
    static double
    getPerimeter(Point2D topLeft, Point2D bottomRight)
    Gets perimeter of a rectangle having provided top-left and bottom-right corners.
    double
    getSignedDistance(double x, double y)
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(double x, double y, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(double x, double y, Point2D center, double width, double height)
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the rectangle locus.
    double
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(Point2D point, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(Point2D point, Point2D center, double width, double height)
    Gets signed distance to the closest point in the rectangle locus.
    static double
    getSignedDistance(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the rectangle locus.
    double
    getSignedDistanceToBottomSide(double x, double y)
    Gets signed distance to the closest point in the bottom border of this rectangle.
    static double
    getSignedDistanceToBottomSide(double x, double y, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    static double
    getSignedDistanceToBottomSide(double x, double y, Point2D center, double width, double height)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    static double
    getSignedDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    double
    Gets signed distance to the closest point in the bottom border of this rectangle.
    static double
    getSignedDistanceToBottomSide(Point2D point, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    static double
    getSignedDistanceToBottomSide(Point2D point, Point2D center, double width, double height)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    static double
    getSignedDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the bottom border of the rectangle.
    double
    getSignedDistanceToLeftSide(double x, double y)
    Gets signed distance to the closest point in the left border of this rectangle.
    static double
    getSignedDistanceToLeftSide(double x, double y, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the left border of the rectangle.
    static double
    getSignedDistanceToLeftSide(double x, double y, Point2D center, double width, double height)
    Gets signed distance to the closest point in the left border of the rectangle.
    static double
    getSignedDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the left border of the rectangle.
    double
    Gets signed distance to the closest point in the left border of this rectangle.
    static double
    getSignedDistanceToLeftSide(Point2D point, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the left border of the rectangle.
    static double
    getSignedDistanceToLeftSide(Point2D point, Point2D center, double width, double height)
    Gets signed distance to the closest point in the left border of the rectangle.
    static double
    getSignedDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the left border of the rectangle.
    double
    getSignedDistanceToRightSide(double x, double y)
    Gets signed distance to the closest point in the right border of this rectangle.
    static double
    getSignedDistanceToRightSide(double x, double y, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the right border of the rectangle.
    static double
    getSignedDistanceToRightSide(double x, double y, Point2D center, double width, double height)
    Gets signed distance to the closest point in the right border of the rectangle.
    static double
    getSignedDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the right border of the rectangle.
    double
    Gets signed distance to the closest point in the right border of this rectangle.
    static double
    getSignedDistanceToRightSide(Point2D point, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the right border of the rectangle.
    static double
    getSignedDistanceToRightSide(Point2D point, Point2D center, double width, double height)
    Gets signed distance to the closest point in the right border of the rectangle.
    static double
    getSignedDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the right border of the rectangle.
    double
    getSignedDistanceToTopSide(double x, double y)
    Gets signed distance to the closest point in the top border of this rectangle.
    static double
    getSignedDistanceToTopSide(double x, double y, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the top border of the rectangle.
    static double
    getSignedDistanceToTopSide(double x, double y, Point2D center, double width, double height)
    Gets signed distance to the closest point in the top border of the rectangle.
    static double
    getSignedDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the top border of the rectangle.
    double
    Gets signed distance to the closest point in the top border of this rectangle.
    static double
    getSignedDistanceToTopSide(Point2D point, double left, double top, double right, double bottom)
    Gets signed distance to the closest point in the top border of the rectangle.
    static double
    getSignedDistanceToTopSide(Point2D point, Point2D center, double width, double height)
    Gets signed distance to the closest point in the top border of the rectangle.
    static double
    getSignedDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Gets signed distance to the closest point in the top border of the rectangle.
    double
    Gets signed height of this rectangle defined as the difference between its bottom-right and top-left vertical coordinates.
    static double
    getSignedHeight(Point2D topLeft, Point2D bottomRight)
    Gets signed height of a rectangle defined as the difference between its bottom-right and top-left vertical coordinates.
    double
    Gets signed width of this rectangle defined as the difference between its bottom-right and top-left horizontal coordinates.
    static double
    getSignedWidth(Point2D topLeft, Point2D bottomRight)
    Gets signed width of a rectangle defined as the difference between bottom-right and top-left horizontal coordinates.
    Gets top-left corner.
    double
    Gets width of this rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.
    static double
    getWidth(Point2D topLeft, Point2D bottomRight)
    Gets width of a rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.
    boolean
    isAtBottomLeftCorner(double x, double y)
    Indicates if provided point coordinates are located at bottom-left corner of this rectangle.
    boolean
    isAtBottomLeftCorner(double x, double y, double threshold)
    Indicates if provided point coordinates are located at bottom-left corner of this rectangle up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomLeftCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at bottom-left corner of this rectangle.
    boolean
    isAtBottomLeftCorner(Point2D point, double threshold)
    Indicates if provided point is located at bottom-left corner of this rectangle up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corner.
    static boolean
    isAtBottomLeftCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided center and size values.
    static boolean
    isAtBottomLeftCorner(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isAtBottomRightCorner(double x, double y)
    Indicates if provided point is located at bottom-right corner of this rectangle.
    boolean
    isAtBottomRightCorner(double x, double y, double threshold)
    Indicates if provided point coordinates are located at bottom-right corner of this rectangle up to a certain threshold.
    static boolean
    isAtBottomRightCorner(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomRightCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomRightCorner(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided center and size values.
    static boolean
    isAtBottomRightCorner(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located bottom-right corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at bottom-right corner of this rectangle.
    boolean
    isAtBottomRightCorner(Point2D point, double threshold)
    Indicates if provided point is located at bottom-right corner of this rectangle.
    static boolean
    isAtBottomRightCorner(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomRightCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomRightCorner(Point2D point, Point2D center, double width, double height)
    indicates if provided point is located at bottom-right corner of rectangle defined by provided center and size values.
    static boolean
    isAtBottomRightCorner(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at bottom-right corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isAtBottomSide(double x, double y)
    Indicates if provided point coordinates are located at bottom side of this rectangle.
    boolean
    isAtBottomSide(double x, double y, double threshold)
    Indicates if provided point coordinates are located at bottom side of this rectangle up to a certain threshold.
    static boolean
    isAtBottomSide(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomSide(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at bottom side of rectangle defined by provided center and size values.
    static boolean
    isAtBottomSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at bottom side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at bottom side of this rectangle.
    boolean
    isAtBottomSide(Point2D point, double threshold)
    Indicates if provided point is located at bottom side of this rectangle.
    static boolean
    isAtBottomSide(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtBottomSide(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at bottom side of rectangle defined by provided center and size values.
    static boolean
    isAtBottomSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at bottom side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
    boolean
    isAtLeftSide(double x, double y)
    Indicates if provided point coordinates are located at left side of this rectangle.
    boolean
    isAtLeftSide(double x, double y, double threshold)
    Indicates if provided point coordinates are located at left side of this rectangle up to a certain threshold.
    static boolean
    isAtLeftSide(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at left side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtLeftSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if point at provided coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtLeftSide(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at left side of rectangle defined by provided center and size values.
    static boolean
    isAtLeftSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at left side of rectangle defined by provided center and size values.
    static boolean
    isAtLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at left side of this rectangle.
    boolean
    isAtLeftSide(Point2D point, double threshold)
    Indicates if provided point is located at left side of this rectangle up to a certain threshold.
    static boolean
    isAtLeftSide(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtLeftSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtLeftSide(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at left side of rectangle defined by provided center and size values.
    static boolean
    isAtLeftSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at left side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isAtRightSide(double x, double y)
    Indicates if provided point coordinates are located at right side of this rectangle.
    boolean
    isAtRightSide(double x, double y, double threshold)
    Indicates if provided point coordinates are located at right side of this rectangle up to a certain threshold.
    static boolean
    isAtRightSide(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at right side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtRightSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtRightSide(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at right side of rectangle defined by provided center and size values.
    static boolean
    isAtRightSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at right side of rectangle defined by provided center and size values.
    static boolean
    isAtRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtRightSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at right side of this rectangle.
    boolean
    isAtRightSide(Point2D point, double threshold)
    Indicates if provided point is located at right side of this rectangle up to a certain threshold.
    static boolean
    isAtRightSide(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtRightSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtRightSide(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at right side of rectangle defined by provided center and size values.
    static boolean
    isAtRightSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at right side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtRightSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners.
    boolean
    isAtTopLeftCorner(double x, double y)
    Indicates if provided point coordinates are located at top-left corner of this rectangle.
    boolean
    isAtTopLeftCorner(double x, double y, double threshold)
    Indicates if provided point coordinates are located at top-left corner of this rectangle up to a certain threshold.
    static boolean
    isAtTopLeftCorner(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopLeftCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopLeftCorner(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided center and size values.
    static boolean
    isAtTopLeftCorner(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at top-left corner of this rectangle.
    boolean
    isAtTopLeftCorner(Point2D point, double threshold)
    Indicates if provided point is located at top-left corner of this rectangle up to a certain threshold.
    static boolean
    isAtTopLeftCorner(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopLeftCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopLeftCorner(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at top-left corner of rectangle defined by provided center and size values.
    static boolean
    isAtTopLeftCorner(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at top-left corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isAtTopRightCorner(double x, double y)
    Indicates if provided point coordinates are located at top-right corner of this rectangle.
    boolean
    isAtTopRightCorner(double x, double y, double threshold)
    Indicates if provided point coordinates are located at top-right corner of this rectangle up to a certain threshold.
    static boolean
    isAtTopRightCorner(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopRightCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopRightCorner(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided center and size values.
    static boolean
    isAtTopRightCorner(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at top-right corner of this rectangle.
    boolean
    isAtTopRightCorner(Point2D point, double threshold)
    Indicates if provided point is located at top-right corner of this rectangle up to a certain threshold.
    static boolean
    isAtTopRightCorner(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopRightCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopRightCorner(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at top-right corner of rectangle defined by provided center and size values.
    static boolean
    isAtTopRightCorner(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at top-right corner of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isAtTopSide(double x, double y)
    Indicates if provided point coordinates are located at top side of this rectangle.
    boolean
    isAtTopSide(double x, double y, double threshold)
    Indicates if provided point coordinates are located at top side of this rectangle up to a certain threshold.
    static boolean
    isAtTopSide(double x, double y, double left, double top, double right, double bottom)
    Indicates if point at provided coordinates is located at top side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopSide(double x, double y, Point2D center, double width, double height)
    Indicates if provided point coordinates are located at top side of rectangle defined by provided center and size values.
    static boolean
    isAtTopSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates if provided point coordinates are located at top side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located at top side of this rectangle.
    boolean
    isAtTopSide(Point2D point, double threshold)
    Indicates if provided point is located at top side of this rectangle up to a certain threshold.
    static boolean
    isAtTopSide(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isAtTopSide(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located at top side of rectangle defined by provided center and size values.
    static boolean
    isAtTopSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located at top side of rectangle defined by provided center and size values up to a certain threshold.
    static boolean
    isAtTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isAtTopSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners.
    boolean
    isInside(double x, double y)
    Indicates if provided point coordinates are located inside this rectangle.
    boolean
    isInside(double x, double y, double threshold)
    Indicates if provided point coordinates are located inside this rectangle up to a certain threshold.
    static boolean
    isInside(double x, double y, double left, double top, double right, double bottom)
    Indicates if provided (x,y) coordinates are located inside the rectangle defined by top-left and bottom-right coordinates.
    static boolean
    isInside(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates if provided (x,y) coordinates are located inside the rectangle defined by top-left and bottom-right coordinates up to a certain threshold.
    static boolean
    isInside(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isInside(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates if provided point is located inside this rectangle.
    boolean
    isInside(Point2D point, double threshold)
    Indicates if provided point is located inside this rectangle up to a certain threshold.
    static boolean
    isInside(Point2D point, double left, double top, double right, double bottom)
    Indicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates.
    static boolean
    isInside(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates up to a certain threshold.
    static boolean
    isInside(Point2D point, Point2D center, double width, double height)
    Indicates if provided point is located inside the rectangle defined by provided center and size.
    static boolean
    isInside(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates if provided point is located inside the rectangle defined by provided center and size up to a certain threshold.
    static boolean
    isInside(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isInside(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isLocus(double x, double y)
    Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
    boolean
    isLocus(double x, double y, double threshold)
    Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
    static boolean
    isLocus(double x, double y, double left, double top, double right, double bottom)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocus(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocus(double x, double y, Point2D center, double width, double height)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size.
    static boolean
    isLocus(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size up to a certain threshold.
    static boolean
    isLocus(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocus(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates whether provided point coordinates belong to the locus of this rectangle.
    boolean
    isLocus(Point2D point, double threshold)
    Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
    static boolean
    isLocus(Point2D point, double left, double top, double right, double bottom)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocus(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocus(Point2D point, Point2D center, double width, double height)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided center and size.
    static boolean
    isLocus(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided center and size up to a certain threshold.
    static boolean
    isLocus(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocus(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isLocusToBottomSide(double x, double y)
    Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.
    boolean
    isLocusToBottomSide(double x, double y, double threshold)
    Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.
    static boolean
    isLocusToBottomSide(double x, double y, double left, double top, double right, double bottom)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToBottomSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToBottomSide(double x, double y, Point2D center, double width, double height)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToBottomSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates whether provided point belongs to the locus of the bottom side of this rectangle.
    boolean
    isLocusToBottomSide(Point2D point, double threshold)
    Indicates whether provided point belongs to the locus of the bottom side of this rectangle.
    static boolean
    isLocusToBottomSide(Point2D point, double left, double top, double right, double bottom)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToBottomSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToBottomSide(Point2D point, Point2D center, double width, double height)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToBottomSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isLocusToLeftSide(double x, double y)
    Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.
    boolean
    isLocusToLeftSide(double x, double y, double threshold)
    Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.
    static boolean
    isLocusToLeftSide(double x, double y, double left, double top, double right, double bottom)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToLeftSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToLeftSide(double x, double y, Point2D center, double width, double height)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToLeftSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates whether provided point belongs to the locus of the left side of this rectangle.
    boolean
    isLocusToLeftSide(Point2D point, double threshold)
    Indicates whether provided point belongs to the locus of the left side of this rectangle.
    static boolean
    isLocusToLeftSide(Point2D point, double left, double top, double right, double bottom)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToLeftSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToLeftSide(Point2D point, Point2D center, double width, double height)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToLeftSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isLocusToRightSide(double x, double y)
    Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.
    boolean
    isLocusToRightSide(double x, double y, double threshold)
    Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.
    static boolean
    isLocusToRightSide(double x, double y, double left, double top, double right, double bottom)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToRightSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToRightSide(double x, double y, Point2D center, double width, double height)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToRightSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates whether provided point belongs to the locus of the right side of this rectangle.
    boolean
    isLocusToRightSide(Point2D point, double threshold)
    Indicates whether provided point belongs to the locus of the right side of this rectangle.
    static boolean
    isLocusToRightSide(Point2D point, double left, double top, double right, double bottom)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToRightSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToRightSide(Point2D point, Point2D center, double width, double height)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToRightSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    isLocusToTopSide(double x, double y)
    Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.
    boolean
    isLocusToTopSide(double x, double y, double threshold)
    Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.
    static boolean
    isLocusToTopSide(double x, double y, double left, double top, double right, double bottom)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToTopSide(double x, double y, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToTopSide(double x, double y, Point2D center, double width, double height)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToTopSide(double x, double y, Point2D center, double width, double height, double threshold)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    boolean
    Indicates whether provided point belongs to the locus of the top side of this rectangle.
    boolean
    isLocusToTopSide(Point2D point, double threshold)
    Indicates whether provided point belongs to the locus of the top side of this rectangle.
    static boolean
    isLocusToTopSide(Point2D point, double left, double top, double right, double bottom)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToTopSide(Point2D point, double left, double top, double right, double bottom, double threshold)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    static boolean
    isLocusToTopSide(Point2D point, Point2D center, double width, double height)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided rectangle center and size.
    static boolean
    isLocusToTopSide(Point2D point, Point2D center, double width, double height, double threshold)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided rectangle center and size up to a certain threshold.
    static boolean
    isLocusToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
    static boolean
    isLocusToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
    Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
    void
    setBottomRight(Point2D bottomRight)
    Sets bottom-right corner.
    final void
    setBounds(double left, double top, double right, double bottom)
    Sets rectangle boundaries.
    final void
    setBounds(Point2D topLeft, Point2D bottomRight)
    Sets rectangle boundaries
    void
    setCenter(double centerX, double centerY)
    Sets center of this rectangle preserving its width and height.
    void
    Sets the center of this rectangle preserving its width and height.
    void
    setCenterAndSize(double centerX, double centerY, double width, double height)
    Sets center and size of this rectangle.
    void
    setCenterAndSize(Point2D center, double width, double height)
    Sets center and size (width and height) of this rectangle.
    void
    Sets top-left corner.
    Creates a 2D box instance equivalent to this rectangle.
    void
    toBox(Box2D result)
    Sets values into provided box instance to make it equivalent to this rectangle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_THRESHOLD

      public static final double DEFAULT_THRESHOLD
      Constant defining default threshold value used when none is provided.
      See Also:
    • topLeft

      private Point2D topLeft
      Top left coordinate of rectangle.
    • bottomRight

      private Point2D bottomRight
      Bottom right coordinate of rectangle.
  • Constructor Details

    • Rectangle

      public Rectangle()
      Empty constructor. Creates a rectangle centered at the origin and having unitary area.
    • Rectangle

      public Rectangle(Point2D topLeft, Point2D bottomRight)
      Constructor with boundaries.
      Parameters:
      topLeft - top-left coordinates.
      bottomRight - bottom-right coordinates.
    • Rectangle

      public Rectangle(double left, double top, double right, double bottom)
      Constructor with boundaries.
      Parameters:
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
    • Rectangle

      public Rectangle(Box2D box)
      Constructor from 2D box.
      Parameters:
      box - a 2D box.
  • Method Details

    • getTopLeft

      public Point2D getTopLeft()
      Gets top-left corner.
      Returns:
      top-left corner.
    • setTopLeft

      public void setTopLeft(Point2D topLeft)
      Sets top-left corner.
      Parameters:
      topLeft - top-left corner.
    • getBottomRight

      public Point2D getBottomRight()
      Gets bottom-right corner.
      Returns:
      bottom-right corner.
    • setBottomRight

      public void setBottomRight(Point2D bottomRight)
      Sets bottom-right corner.
      Parameters:
      bottomRight - bottom-right corner.
    • setBounds

      public final void setBounds(Point2D topLeft, Point2D bottomRight)
      Sets rectangle boundaries
      Parameters:
      topLeft - top-left coordinates.
      bottomRight - bottom-right coordinates.
    • setBounds

      public final void setBounds(double left, double top, double right, double bottom)
      Sets rectangle boundaries.
      Parameters:
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
    • getCenter

      public static void getCenter(Point2D topLeft, Point2D bottomRight, Point2D result)
      Gets center of rectangle.
      Parameters:
      topLeft - top-left coordinates.
      bottomRight - bottom-right coordinates.
      result - instance where center of rectangle will be stored.
    • getCenter

      public static void getCenter(double left, double top, double right, double bottom, Point2D result)
      Gets center of rectangle.
      Parameters:
      left - left coordinate.
      top - top coordinate
      right - right coordinate.
      bottom - bottom coordinate.
      result - instance where center of rectangle will be stored.
    • getCenter

      public static Point2D getCenter(Point2D topLeft, Point2D bottomRight)
      Gets center of rectangle.
      Parameters:
      topLeft - top-left coordinates.
      bottomRight - bottom-right coordinates.
      Returns:
      center of rectangle.
    • getCenter

      public static Point2D getCenter(double left, double top, double right, double bottom)
      Gets center of rectangle.
      Parameters:
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      Returns:
      center of rectangle.
    • getCenter

      public void getCenter(Point2D result)
      Gets center of rectangle.
      Parameters:
      result - instance where coordinates of center of rectangle will be stored.
    • getCenter

      public Point2D getCenter()
      Gets center of rectangle.
      Returns:
      a new point containing center of rectangle.
    • fromBox

      public final void fromBox(Box2D box)
      Sets values of this rectangle from provided 2D box.
      Parameters:
      box - a 2D box containing rectangle boundaries.
    • toBox

      public Box2D toBox()
      Creates a 2D box instance equivalent to this rectangle.
      Returns:
      a new 2D box instance equivalent to this rectangle.
    • toBox

      public void toBox(Box2D result)
      Sets values into provided box instance to make it equivalent to this rectangle.
      Parameters:
      result - instance where values will be stored.
    • getSignedWidth

      public static double getSignedWidth(Point2D topLeft, Point2D bottomRight)
      Gets signed width of a rectangle defined as the difference between bottom-right and top-left horizontal coordinates. Signed width will be positive if bottom-right corner is located at the rightmost position and will be negative otherwise.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      signed width.
    • getSignedWidth

      public double getSignedWidth()
      Gets signed width of this rectangle defined as the difference between its bottom-right and top-left horizontal coordinates. Signed width will be positive if bottom-right corner is located at the rightmost position and will be negative otherwise.
      Returns:
      signed width of this rectangle.
    • getWidth

      public static double getWidth(Point2D topLeft, Point2D bottomRight)
      Gets width of a rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      width the rectangle.
    • getWidth

      public double getWidth()
      Gets width of this rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.
      Returns:
      width of this rectangle.
    • getSignedHeight

      public static double getSignedHeight(Point2D topLeft, Point2D bottomRight)
      Gets signed height of a rectangle defined as the difference between its bottom-right and top-left vertical coordinates. Signed height will be negative if bottom-right corner is located at the lowest position and will be positive otherwise.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      signed height.
    • getSignedHeight

      public double getSignedHeight()
      Gets signed height of this rectangle defined as the difference between its bottom-right and top-left vertical coordinates. Signed height will be negative if bottom right corner is located at the lowest position and will be positive otherwise.
      Returns:
      signed height of this rectangle.
    • getHeight

      public static double getHeight(Point2D topLeft, Point2D bottomRight)
      Gets height of a rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      height of the rectangle.
    • getHeight

      public double getHeight()
      Gets height of this rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.
      Returns:
      height of this rectangle.
    • getArea

      public static double getArea(Point2D topLeft, Point2D bottomRight)
      Gets area of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner
      Returns:
      area of rectangle.
    • getArea

      public static double getArea(double left, double top, double right, double bottom)
      Gets area of the rectangle defined by provided corner coordinates.
      Parameters:
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      Returns:
      area of rectangle.
    • getArea

      public static double getArea(double width, double height)
      Gets area of the rectangle having provided width and height values.
      Parameters:
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      area of rectangle.
    • getArea

      public double getArea()
      Gets area of this rectangle.
      Returns:
      area of this rectangle.
    • setCenter

      public void setCenter(Point2D center)
      Sets the center of this rectangle preserving its width and height.
      Parameters:
      center - new center to be set.
    • setCenter

      public void setCenter(double centerX, double centerY)
      Sets center of this rectangle preserving its width and height.
      Parameters:
      centerX - x coordinate of new center to be set.
      centerY - y coordinate of new center to be set.
    • setCenterAndSize

      public void setCenterAndSize(Point2D center, double width, double height)
      Sets center and size (width and height) of this rectangle.
      Parameters:
      center - new center to be set.
      width - new width to be set. (can be signed).
      height - new height to be set. (can be signed).
    • setCenterAndSize

      public void setCenterAndSize(double centerX, double centerY, double width, double height)
      Sets center and size of this rectangle.
      Parameters:
      centerX - x coordinate of new center to be set.
      centerY - y coordinate of new center to be set.
      width - new width to be set. (can be signed).
      height - new height to be set. (can be signed).
    • getPerimeter

      public static double getPerimeter(double width, double height)
      Gets perimeter of a rectangle having provided width and height.
      Parameters:
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      perimeter of a rectangle having provided width and height.
    • getPerimeter

      public static double getPerimeter(Point2D topLeft, Point2D bottomRight)
      Gets perimeter of a rectangle having provided top-left and bottom-right corners.
      Parameters:
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      perimeter of rectangle.
    • getPerimeter

      public static double getPerimeter(double left, double top, double right, double bottom)
      Gets perimeter of a rectangle having provided top-left and bottom-right corners.
      Parameters:
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      Returns:
      perimeter of rectangle.
    • getPerimeter

      public double getPerimeter()
      Gets perimeter of this rectangle.
      Returns:
      perimeter of this rectangle.
    • isInside

      public static boolean isInside(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided (x,y) coordinates are located inside the rectangle defined by top-left and bottom-right coordinates up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      threshold - threshold to use as a margin to determine whether a point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(double x, double y, double left, double top, double right, double bottom)
      Indicates if provided (x,y) coordinates are located inside the rectangle defined by top-left and bottom-right coordinates.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      point - point to be checked.
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates.
      Parameters:
      point - point to be checked.
      left - left coordinate.
      top - top coordinate.
      right - right coordinate.
      bottom - bottom coordinate.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located inside the rectangle defined by provided center and size up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located inside the rectangle defined by provided center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public static boolean isInside(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner.
      bottomRight - bottom-right corner.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public boolean isInside(double x, double y, double threshold)
      Indicates if provided point coordinates are located inside this rectangle up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public boolean isInside(double x, double y)
      Indicates if provided point coordinates are located inside this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public boolean isInside(Point2D point, double threshold)
      Indicates if provided point is located inside this rectangle up to a certain threshold. A positive threshold makes inside area smaller, a negative threshold increases the inside area.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies inside or not.
      Returns:
      true if point is inside, false otherwise.
    • isInside

      public boolean isInside(Point2D point)
      Indicates if provided point is located inside this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is inside, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if point at provided coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at left side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at left side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point lies at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at left side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point lies at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at left side of rectangle defined by provided center and size values. A positive threshold moves left border to the right, a negative threshold moves border to the left.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at left side of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at left side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public static boolean isAtLeftSide(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at left side of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public boolean isAtLeftSide(double x, double y, double threshold)
      Indicates if provided point coordinates are located at left side of this rectangle up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public boolean isAtLeftSide(double x, double y)
      Indicates if provided point coordinates are located at left side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public boolean isAtLeftSide(Point2D point, double threshold)
      Indicates if provided point is located at left side of this rectangle up to a certain threshold. A positive threshold moves left border to the right, a negative threshold moves left border to the left.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtLeftSide

      public boolean isAtLeftSide(Point2D point)
      Indicates if provided point is located at left side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at left side, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at top-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at top-left corner of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at top-left corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public static boolean isAtTopLeftCorner(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at top-left corner of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public boolean isAtTopLeftCorner(double x, double y, double threshold)
      Indicates if provided point coordinates are located at top-left corner of this rectangle up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public boolean isAtTopLeftCorner(double x, double y)
      Indicates if provided point coordinates are located at top-left corner of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public boolean isAtTopLeftCorner(Point2D point, double threshold)
      Indicates if provided point is located at top-left corner of this rectangle up to a certain threshold. A positive threshold moves top-left corner towards the rectangle interior, a negative threshold moves top-left corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopLeftCorner

      public boolean isAtTopLeftCorner(Point2D point)
      Indicates if provided point is located at top-left corner of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at top side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at top side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at top side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at top side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at top side of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at top side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public static boolean isAtTopSide(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at top side of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public boolean isAtTopSide(double x, double y, double threshold)
      Indicates if provided point coordinates are located at top side of this rectangle up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public boolean isAtTopSide(double x, double y)
      Indicates if provided point coordinates are located at top side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public boolean isAtTopSide(Point2D point, double threshold)
      Indicates if provided point is located at top side of this rectangle up to a certain threshold. A positive threshold moves top border downwards, a negative threshold moves top border upwards.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top side or not.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopSide

      public boolean isAtTopSide(Point2D point)
      Indicates if provided point is located at top side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at top side, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner side or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at top-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-left corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at top-right corner of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at top-right corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public static boolean isAtTopRightCorner(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at top-right corner of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public boolean isAtTopRightCorner(double x, double y, double threshold)
      Indicates if provided point coordinates are located at top-right corner of this rectangle up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public boolean isAtTopRightCorner(double x, double y)
      Indicates if provided point coordinates are located at top-right corner of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public boolean isAtTopRightCorner(Point2D point, double threshold)
      Indicates if provided point is located at top-right corner of this rectangle up to a certain threshold. A positive threshold moves top-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtTopRightCorner

      public boolean isAtTopRightCorner(Point2D point)
      Indicates if provided point is located at top-right corner of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at top-right corner, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at right side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at right side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point lies at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at right side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point lies at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at right side of rectangle defined by provided center and size values. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at right side of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at right side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at left side or not.
      Returns:
      true if point is at left side, false otherwise.
    • isAtRightSide

      public static boolean isAtRightSide(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at right side of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public boolean isAtRightSide(double x, double y, double threshold)
      Indicates if provided point coordinates are located at right side of this rectangle up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public boolean isAtRightSide(double x, double y)
      Indicates if provided point coordinates are located at right side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public boolean isAtRightSide(Point2D point, double threshold)
      Indicates if provided point is located at right side of this rectangle up to a certain threshold. A positive threshold moves right border to the left, a negative threshold moves right border to the right.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at right side or not.
      Returns:
      true if point is at right side, false otherwise.
    • isAtRightSide

      public boolean isAtRightSide(Point2D point)
      Indicates if provided point is located at right side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at right side, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner, false otherwise
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not.
      Returns:
      true if point is at top-left corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at bottom-right corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located bottom-right corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at bottom-right corner of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at bottom-right corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public static boolean isAtBottomRightCorner(Point2D point, Point2D center, double width, double height)
      indicates if provided point is located at bottom-right corner of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public boolean isAtBottomRightCorner(double x, double y, double threshold)
      Indicates if provided point coordinates are located at bottom-right corner of this rectangle up to a certain threshold. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public boolean isAtBottomRightCorner(double x, double y)
      Indicates if provided point is located at bottom-right corner of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public boolean isAtBottomRightCorner(Point2D point, double threshold)
      Indicates if provided point is located at bottom-right corner of this rectangle. A positive threshold moves bottom-right corner towards the rectangle interior, a negative threshold moves bottom-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom-right corner or not.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomRightCorner

      public boolean isAtBottomRightCorner(Point2D point)
      Indicates if provided point is located at bottom-right corner of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at bottom-right corner, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at bottom side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at bottom side of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at bottom side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at bottom side of rectangle defined by provided center and size values.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at top side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at bottom side of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public static boolean isAtBottomSide(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at bottom side of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public boolean isAtBottomSide(double x, double y, double threshold)
      Indicates if provided point coordinates are located at bottom side of this rectangle up to a certain threshold. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public boolean isAtBottomSide(double x, double y)
      Indicates if provided point coordinates are located at bottom side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public boolean isAtBottomSide(Point2D point, double threshold)
      Indicates if provided point is located at bottom side of this rectangle. A positive threshold moves bottom border upwards, a negative threshold moves bottom border downwards
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom side or not.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomSide

      public boolean isAtBottomSide(Point2D point)
      Indicates if provided point is located at bottom side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at bottom side, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, double left, double top, double right, double bottom)
      Indicates if point at provided coordinates is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, double left, double top, double right, double bottom)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corner.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(double x, double y, Point2D center, double width, double height)
      Indicates if provided point coordinates are located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided center and size values up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point lies at top-right corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public static boolean isAtBottomLeftCorner(Point2D point, Point2D center, double width, double height)
      Indicates if provided point is located at bottom-left corner of rectangle defined by provided center and size values.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public boolean isAtBottomLeftCorner(double x, double y, double threshold)
      Indicates if provided point coordinates are located at bottom-left corner of this rectangle up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public boolean isAtBottomLeftCorner(double x, double y)
      Indicates if provided point coordinates are located at bottom-left corner of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public boolean isAtBottomLeftCorner(Point2D point, double threshold)
      Indicates if provided point is located at bottom-left corner of this rectangle up to a certain threshold. A positive threshold moves bottom-right corner towards rectangle interior, a negative threshold moves top-right corner towards rectangle exterior.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point lies at bottom-left corner or not.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • isAtBottomLeftCorner

      public boolean isAtBottomLeftCorner(Point2D point)
      Indicates if provided point is located at bottom-left corner of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is at bottom-left corner, false otherwise.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(double x, double y, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(Point2D point, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(double x, double y, Point2D center, double width, double height)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public static double getSignedDistanceToLeftSide(Point2D point, Point2D center, double width, double height)
      Gets signed distance to the closest point in the left border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public double getSignedDistanceToLeftSide(double x, double y)
      Gets signed distance to the closest point in the left border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToLeftSide

      public double getSignedDistanceToLeftSide(Point2D point)
      Gets signed distance to the closest point in the left border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle left border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(double x, double y, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(Point2D point, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(double x, double y, Point2D center, double width, double height)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public static double getSignedDistanceToTopSide(Point2D point, Point2D center, double width, double height)
      Gets signed distance to the closest point in the top border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public double getSignedDistanceToTopSide(double x, double y)
      Gets signed distance to the closest point in the top border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToTopSide

      public double getSignedDistanceToTopSide(Point2D point)
      Gets signed distance to the closest point in the top border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle top border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(double x, double y, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(Point2D point, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(double x, double y, Point2D center, double width, double height)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public static double getSignedDistanceToRightSide(Point2D point, Point2D center, double width, double height)
      Gets signed distance to the closest point in the right border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public double getSignedDistanceToRightSide(double x, double y)
      Gets signed distance to the closest point in the right border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToRightSide

      public double getSignedDistanceToRightSide(Point2D point)
      Gets signed distance to the closest point in the right border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle right border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(double x, double y, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(Point2D point, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(double x, double y, Point2D center, double width, double height)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public static double getSignedDistanceToBottomSide(Point2D point, Point2D center, double width, double height)
      Gets signed distance to the closest point in the bottom border of the rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public double getSignedDistanceToBottomSide(double x, double y)
      Gets signed distance to the closest point in the bottom border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistanceToBottomSide

      public double getSignedDistanceToBottomSide(Point2D point)
      Gets signed distance to the closest point in the bottom border of this rectangle. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle bottom border.
    • getSignedDistance

      public static double getSignedDistance(double x, double y, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public static double getSignedDistance(Point2D point, double left, double top, double right, double bottom)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public static double getSignedDistance(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public static double getSignedDistance(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public static double getSignedDistance(double x, double y, Point2D center, double width, double height)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public static double getSignedDistance(Point2D point, Point2D center, double width, double height)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public double getSignedDistance(double x, double y)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      x - x coordinate of point to obtain signed distance for.
      y - y coordinate of point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getSignedDistance

      public double getSignedDistance(Point2D point)
      Gets signed distance to the closest point in the rectangle locus. A negative distance indicates that point is placed inside the rectangle, a positive distance indicates that point is placed outside the rectangle.
      Parameters:
      point - point to obtain signed distance for.
      Returns:
      signed distance to the closest point in the rectangle locus.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(double x, double y, double left, double top, double right, double bottom)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(Point2D point, double left, double top, double right, double bottom)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(double x, double y, Point2D center, double width, double height)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public static double getDistanceToLeftSide(Point2D point, Point2D center, double width, double height)
      Gets distance to the closest point in the left border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public double getDistanceToLeftSide(double x, double y)
      Gets distance to the closest point in the left border of this rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToLeftSide

      public double getDistanceToLeftSide(Point2D point)
      Gets distance to the closest point in the left border of this rectangle.
      Parameters:
      point - point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle left border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(double x, double y, double left, double top, double right, double bottom)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(Point2D point, double left, double top, double right, double bottom)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(double x, double y, Point2D center, double width, double height)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public static double getDistanceToTopSide(Point2D point, Point2D center, double width, double height)
      Gets distance to the closest point in the top border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public double getDistanceToTopSide(double x, double y)
      Gets distance to the closest point in the top border of this rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToTopSide

      public double getDistanceToTopSide(Point2D point)
      Gets distance to the closest point in the top border of this rectangle.
      Parameters:
      point - point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle top border.
    • getDistanceToRightSide

      public static double getDistanceToRightSide(double x, double y, double left, double top, double right, double bottom)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public static double getDistanceToRightSide(Point2D point, double left, double top, double right, double bottom)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public static double getDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle right border
    • getDistanceToRightSide

      public static double getDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public static double getDistanceToRightSide(double x, double y, Point2D center, double width, double height)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public static double getDistanceToRightSide(Point2D point, Point2D center, double width, double height)
      Gets distance to the closest point in the right border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public double getDistanceToRightSide(double x, double y)
      Gets distance to the closest point in the right border of this rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToRightSide

      public double getDistanceToRightSide(Point2D point)
      Gets distance to the closest point in the right border of this rectangle.
      Parameters:
      point - point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle right border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(double x, double y, double left, double top, double right, double bottom)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(Point2D point, double left, double top, double right, double bottom)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(double x, double y, Point2D center, double width, double height)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public static double getDistanceToBottomSide(Point2D point, Point2D center, double width, double height)
      Gets distance to the closest point in the bottom border of the rectangle.
      Parameters:
      point - point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public double getDistanceToBottomSide(double x, double y)
      Gets distance to the closest point in the bottom border of this rectangle.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle bottom border.
    • getDistanceToBottomSide

      public double getDistanceToBottomSide(Point2D point)
      Gets distance to the closest point in the bottom border of this rectangle.
      Parameters:
      point - point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle bottom.
    • getDistance

      public static double getDistance(double x, double y, double left, double top, double right, double bottom)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public static double getDistance(Point2D point, double left, double top, double right, double bottom)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      point - point to obtain distance for.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public static double getDistance(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public static double getDistance(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      point - point to obtain distance for.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public static double getDistance(double x, double y, Point2D center, double width, double height)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public static double getDistance(Point2D point, Point2D center, double width, double height)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      point - point to obtain distance for.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public double getDistance(double x, double y)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      x - x coordinate of point to obtain distance for.
      y - y coordinate of point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle locus.
    • getDistance

      public double getDistance(Point2D point)
      Gets distance to the closest point in the rectangle locus.
      Parameters:
      point - point to obtain distance for.
      Returns:
      distance to the closest point in the rectangle locus.
    • closestPoint

      public static void closestPoint(double x, double y, double left, double top, double right, double bottom, Point2D result)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public static void closestPoint(Point2D point, double left, double top, double right, double bottom, Point2D result)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
      Parameters:
      point - point to find the closest point to.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public static void closestPoint(double x, double y, Point2D topLeft, Point2D bottomRight, Point2D result)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public static void closestPoint(Point2D point, Point2D topLeft, Point2D bottomRight, Point2D result)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
      Parameters:
      point - point to find the closest point to.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public static void closestPoint(double x, double y, Point2D center, double width, double height, Point2D result)
      Gets closest point in the rectangle locus defined by provided center and rectangle size.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public static void closestPoint(Point2D point, Point2D center, double width, double height, Point2D result)
      Gets closest point in the rectangle locus defined by provided center rectangle size.
      Parameters:
      point - point to find the closest point to.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public void closestPoint(double x, double y, Point2D result)
      Gets closest point in this rectangle locus.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      result - instance where coordinates of resulting closest point will be stored.
    • closestPoint

      public void closestPoint(Point2D point, Point2D result)
      Gets closest point in this rectangle locus.
      Parameters:
      point - point to find the closest point to.
      result - instance where coordinates of resulting closest point will be stored.
    • getClosestPoint

      public static Point2D getClosestPoint(double x, double y, double left, double top, double right, double bottom)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public static Point2D getClosestPoint(Point2D point, double left, double top, double right, double bottom)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
      Parameters:
      point - point to find the closest point to.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public static Point2D getClosestPoint(double x, double y, Point2D topLeft, Point2D bottomRight)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point coordinates.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public static Point2D getClosestPoint(Point2D point, Point2D topLeft, Point2D bottomRight)
      Gets closest point in the rectangle locus defined by provided top-left and bottom-right corners to provided point.
      Parameters:
      point - point to find the closest point to.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public static Point2D getClosestPoint(double x, double y, Point2D center, double width, double height)
      Gets closest point in the rectangle locus defined by provided center and rectangle size to provided point.
      Parameters:
      x - x point coordinate to find the closest point to.
      y - y point coordinate to find the closest point to.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public static Point2D getClosestPoint(Point2D point, Point2D center, double width, double height)
      Gets closest point in the rectangle locus defined by provided center and rectangle size to provided point.
      Parameters:
      point - point to find the closest point to.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public Point2D getClosestPoint(double x, double y)
      Gets closest point in this rectangle locus to provided point coordinates.
      Parameters:
      x - x coordinate to find the closest point to.
      y - y coordinate to find the closest point to.
      Returns:
      closest point in the rectangle locus.
    • getClosestPoint

      public Point2D getClosestPoint(Point2D point)
      Gets closest point in this rectangle locus to provided point.
      Parameters:
      point - point to find the closest point to.
      Returns:
      closest point in the rectangle locus.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public boolean isLocusToLeftSide(double x, double y, double threshold)
      Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public boolean isLocusToLeftSide(Point2D point, double threshold)
      Indicates whether provided point belongs to the locus of the left side of this rectangle.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to left side of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, double left, double top, double right, double bottom)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, double left, double top, double right, double bottom)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(double x, double y, Point2D center, double width, double height)
      Indicates whether provided point coordinates belong to the locus of the left side of the rectangle defined by provided rectangle center and size.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public static boolean isLocusToLeftSide(Point2D point, Point2D center, double width, double height)
      Indicates whether provided point belongs to the locus of the left side of the rectangle defined by provided rectangle center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public boolean isLocusToLeftSide(double x, double y)
      Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToLeftSide

      public boolean isLocusToLeftSide(Point2D point)
      Indicates whether provided point belongs to the locus of the left side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is locus to left side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public boolean isLocusToTopSide(double x, double y, double threshold)
      Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public boolean isLocusToTopSide(Point2D point, double threshold)
      Indicates whether provided point belongs to the locus of the top side of this rectangle.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to top side of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, double left, double top, double right, double bottom)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, double left, double top, double right, double bottom)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(double x, double y, Point2D center, double width, double height)
      Indicates whether provided point coordinates belong to the locus of the top side of the rectangle defined by provided rectangle center and size.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public static boolean isLocusToTopSide(Point2D point, Point2D center, double width, double height)
      Indicates whether provided point belongs to the locus of the top side of the rectangle defined by provided rectangle center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public boolean isLocusToTopSide(double x, double y)
      Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToTopSide

      public boolean isLocusToTopSide(Point2D point)
      Indicates whether provided point belongs to the locus of the top side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is locus to top side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public boolean isLocusToRightSide(double x, double y, double threshold)
      Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public boolean isLocusToRightSide(Point2D point, double threshold)
      Indicates whether provided point belongs to the locus of the right side of this rectangle.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, double left, double top, double right, double bottom)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, double left, double top, double right, double bottom)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(double x, double y, Point2D center, double width, double height)
      Indicates whether provided point coordinates belong to the locus of the right side of the rectangle defined by provided rectangle center and size.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public static boolean isLocusToRightSide(Point2D point, Point2D center, double width, double height)
      Indicates whether provided point belongs to the locus of the right side of the rectangle defined by provided rectangle center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public boolean isLocusToRightSide(double x, double y)
      Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToRightSide

      public boolean isLocusToRightSide(Point2D point)
      Indicates whether provided point belongs to the locus of the right side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is locus to right side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to right side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided rectangle center and size up to a certain threshold.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public boolean isLocusToBottomSide(double x, double y, double threshold)
      Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public boolean isLocusToBottomSide(Point2D point, double threshold)
      Indicates whether provided point belongs to the locus of the bottom side of this rectangle.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus to bottom side of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, double left, double top, double right, double bottom)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, double left, double top, double right, double bottom)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(double x, double y, Point2D center, double width, double height)
      Indicates whether provided point coordinates belong to the locus of the bottom side of the rectangle defined by provided rectangle center and size.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public static boolean isLocusToBottomSide(Point2D point, Point2D center, double width, double height)
      Indicates whether provided point belongs to the locus of the bottom side of the rectangle defined by provided rectangle center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public boolean isLocusToBottomSide(double x, double y)
      Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocusToBottomSide

      public boolean isLocusToBottomSide(Point2D point)
      Indicates whether provided point belongs to the locus of the bottom side of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is locus to bottom side of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(double x, double y, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(Point2D point, double left, double top, double right, double bottom, double threshold)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(double x, double y, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(Point2D point, Point2D topLeft, Point2D bottomRight, double threshold)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(double x, double y, Point2D center, double width, double height, double threshold)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(Point2D point, Point2D center, double width, double height, double threshold)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided center and size up to a certain threshold.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public boolean isLocus(double x, double y, double threshold)
      Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public boolean isLocus(Point2D point, double threshold)
      Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
      Parameters:
      point - point to be checked.
      threshold - threshold to use as a margin to determine whether point is locus of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
      Throws:
      IllegalArgumentException - if provided threshold is negative.
    • isLocus

      public static boolean isLocus(double x, double y, double left, double top, double right, double bottom)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(Point2D point, double left, double top, double right, double bottom)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      left - left coordinate of rectangle.
      top - top coordinate of rectangle.
      right - right coordinate of rectangle.
      bottom - bottom coordinate of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(double x, double y, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(Point2D point, Point2D topLeft, Point2D bottomRight)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.
      Parameters:
      point - point to be checked.
      topLeft - top-left corner of rectangle.
      bottomRight - bottom-right corner of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(double x, double y, Point2D center, double width, double height)
      Indicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public static boolean isLocus(Point2D point, Point2D center, double width, double height)
      Indicates whether provided point belongs to the locus of the rectangle defined by provided center and size.
      Parameters:
      point - point to be checked.
      center - center of rectangle.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public boolean isLocus(double x, double y)
      Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.
      Parameters:
      x - x coordinate of point to be checked.
      y - y coordinate of point to be checked.
      Returns:
      true if point is locus of rectangle, false otherwise.
    • isLocus

      public boolean isLocus(Point2D point)
      Indicates whether provided point coordinates belong to the locus of this rectangle.
      Parameters:
      point - point to be checked.
      Returns:
      true if point is locus of rectangle, false otherwise.