Package com.irurueta.geometry
Class Rectangle
java.lang.Object
com.irurueta.geometry.Rectangle
- All Implemented Interfaces:
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclosestPoint(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.voidclosestPoint(double x, double y, Point2D result) Gets closest point in this rectangle locus.static voidclosestPoint(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 voidclosestPoint(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 voidclosestPoint(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.voidclosestPoint(Point2D point, Point2D result) Gets closest point in this rectangle locus.static voidclosestPoint(Point2D point, Point2D center, double width, double height, Point2D result) Gets closest point in the rectangle locus defined by provided center rectangle size.static voidclosestPoint(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 voidSets values of this rectangle from provided 2D box.doublegetArea()Gets area of this rectangle.static doublegetArea(double width, double height) Gets area of the rectangle having provided width and height values.static doublegetArea(double left, double top, double right, double bottom) Gets area of the rectangle defined by provided corner coordinates.static doubleGets area of the rectangle defined by provided top-left and bottom-right corners.Gets bottom-right corner.Gets center of rectangle.static Point2DgetCenter(double left, double top, double right, double bottom) Gets center of rectangle.static voidGets center of rectangle.voidGets center of rectangle.static Point2DGets center of rectangle.static voidGets center of rectangle.getClosestPoint(double x, double y) Gets closest point in this rectangle locus to provided point coordinates.static Point2DgetClosestPoint(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 Point2DgetClosestPoint(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 Point2DgetClosestPoint(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.getClosestPoint(Point2D point) Gets closest point in this rectangle locus to provided point.static Point2DgetClosestPoint(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 Point2DgetClosestPoint(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 Point2DgetClosestPoint(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.doublegetDistance(double x, double y) Gets distance to the closest point in the rectangle locus.static doublegetDistance(double x, double y, double left, double top, double right, double bottom) Gets distance to the closest point in the rectangle locus.static doublegetDistance(double x, double y, Point2D center, double width, double height) Gets distance to the closest point in the rectangle locus.static doublegetDistance(double x, double y, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the rectangle locus.doublegetDistance(Point2D point) Gets distance to the closest point in the rectangle locus.static doublegetDistance(Point2D point, double left, double top, double right, double bottom) Gets distance to the closest point in the rectangle locus.static doublegetDistance(Point2D point, Point2D center, double width, double height) Gets distance to the closest point in the rectangle locus.static doublegetDistance(Point2D point, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the rectangle locus.doublegetDistanceToBottomSide(double x, double y) Gets distance to the closest point in the bottom border of this rectangle.static doublegetDistanceToBottomSide(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 doublegetDistanceToBottomSide(double x, double y, Point2D center, double width, double height) Gets distance to the closest point in the bottom border of the rectangle.static doublegetDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the bottom border of the rectangle.doublegetDistanceToBottomSide(Point2D point) Gets distance to the closest point in the bottom border of this rectangle.static doublegetDistanceToBottomSide(Point2D point, double left, double top, double right, double bottom) Gets distance to the closest point in the bottom border of the rectangle.static doublegetDistanceToBottomSide(Point2D point, Point2D center, double width, double height) Gets distance to the closest point in the bottom border of the rectangle.static doublegetDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the bottom border of the rectangle.doublegetDistanceToLeftSide(double x, double y) Gets distance to the closest point in the left border of this rectangle.static doublegetDistanceToLeftSide(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 doublegetDistanceToLeftSide(double x, double y, Point2D center, double width, double height) Gets distance to the closest point in the left border of the rectangle.static doublegetDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the left border of the rectangle.doublegetDistanceToLeftSide(Point2D point) Gets distance to the closest point in the left border of this rectangle.static doublegetDistanceToLeftSide(Point2D point, double left, double top, double right, double bottom) Gets distance to the closest point in the left border of the rectangle.static doublegetDistanceToLeftSide(Point2D point, Point2D center, double width, double height) Gets distance to the closest point in the left border of the rectangle.static doublegetDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the left border of the rectangle.doublegetDistanceToRightSide(double x, double y) Gets distance to the closest point in the right border of this rectangle.static doublegetDistanceToRightSide(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 doublegetDistanceToRightSide(double x, double y, Point2D center, double width, double height) Gets distance to the closest point in the right border of the rectangle.static doublegetDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the right border of the rectangle.doublegetDistanceToRightSide(Point2D point) Gets distance to the closest point in the right border of this rectangle.static doublegetDistanceToRightSide(Point2D point, double left, double top, double right, double bottom) Gets distance to the closest point in the right border of the rectangle.static doublegetDistanceToRightSide(Point2D point, Point2D center, double width, double height) Gets distance to the closest point in the right border of the rectangle.static doublegetDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the right border of the rectangle.doublegetDistanceToTopSide(double x, double y) Gets distance to the closest point in the top border of this rectangle.static doublegetDistanceToTopSide(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 doublegetDistanceToTopSide(double x, double y, Point2D center, double width, double height) Gets distance to the closest point in the top border of the rectangle.static doublegetDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the top border of the rectangle.doublegetDistanceToTopSide(Point2D point) Gets distance to the closest point in the top border of this rectangle.static doublegetDistanceToTopSide(Point2D point, double left, double top, double right, double bottom) Gets distance to the closest point in the top border of the rectangle.static doublegetDistanceToTopSide(Point2D point, Point2D center, double width, double height) Gets distance to the closest point in the top border of the rectangle.static doublegetDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets distance to the closest point in the top border of the rectangle.doubleGets height of this rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.static doubleGets height of a rectangle defined as the absolute difference between bottom-right and top-left vertical coordinates.doubleGets perimeter of this rectangle.static doublegetPerimeter(double width, double height) Gets perimeter of a rectangle having provided width and height.static doublegetPerimeter(double left, double top, double right, double bottom) Gets perimeter of a rectangle having provided top-left and bottom-right corners.static doublegetPerimeter(Point2D topLeft, Point2D bottomRight) Gets perimeter of a rectangle having provided top-left and bottom-right corners.doublegetSignedDistance(double x, double y) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(double x, double y, double left, double top, double right, double bottom) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(double x, double y, Point2D center, double width, double height) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(double x, double y, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the rectangle locus.doublegetSignedDistance(Point2D point) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(Point2D point, double left, double top, double right, double bottom) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(Point2D point, Point2D center, double width, double height) Gets signed distance to the closest point in the rectangle locus.static doublegetSignedDistance(Point2D point, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the rectangle locus.doublegetSignedDistanceToBottomSide(double x, double y) Gets signed distance to the closest point in the bottom border of this rectangle.static doublegetSignedDistanceToBottomSide(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 doublegetSignedDistanceToBottomSide(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 doublegetSignedDistanceToBottomSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the bottom border of the rectangle.doubleGets signed distance to the closest point in the bottom border of this rectangle.static doublegetSignedDistanceToBottomSide(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 doublegetSignedDistanceToBottomSide(Point2D point, Point2D center, double width, double height) Gets signed distance to the closest point in the bottom border of the rectangle.static doublegetSignedDistanceToBottomSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the bottom border of the rectangle.doublegetSignedDistanceToLeftSide(double x, double y) Gets signed distance to the closest point in the left border of this rectangle.static doublegetSignedDistanceToLeftSide(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 doublegetSignedDistanceToLeftSide(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 doublegetSignedDistanceToLeftSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the left border of the rectangle.doubleGets signed distance to the closest point in the left border of this rectangle.static doublegetSignedDistanceToLeftSide(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 doublegetSignedDistanceToLeftSide(Point2D point, Point2D center, double width, double height) Gets signed distance to the closest point in the left border of the rectangle.static doublegetSignedDistanceToLeftSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the left border of the rectangle.doublegetSignedDistanceToRightSide(double x, double y) Gets signed distance to the closest point in the right border of this rectangle.static doublegetSignedDistanceToRightSide(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 doublegetSignedDistanceToRightSide(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 doublegetSignedDistanceToRightSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the right border of the rectangle.doubleGets signed distance to the closest point in the right border of this rectangle.static doublegetSignedDistanceToRightSide(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 doublegetSignedDistanceToRightSide(Point2D point, Point2D center, double width, double height) Gets signed distance to the closest point in the right border of the rectangle.static doublegetSignedDistanceToRightSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the right border of the rectangle.doublegetSignedDistanceToTopSide(double x, double y) Gets signed distance to the closest point in the top border of this rectangle.static doublegetSignedDistanceToTopSide(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 doublegetSignedDistanceToTopSide(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 doublegetSignedDistanceToTopSide(double x, double y, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the top border of the rectangle.doubleGets signed distance to the closest point in the top border of this rectangle.static doublegetSignedDistanceToTopSide(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 doublegetSignedDistanceToTopSide(Point2D point, Point2D center, double width, double height) Gets signed distance to the closest point in the top border of the rectangle.static doublegetSignedDistanceToTopSide(Point2D point, Point2D topLeft, Point2D bottomRight) Gets signed distance to the closest point in the top border of the rectangle.doubleGets signed height of this rectangle defined as the difference between its bottom-right and top-left vertical coordinates.static doublegetSignedHeight(Point2D topLeft, Point2D bottomRight) Gets signed height of a rectangle defined as the difference between its bottom-right and top-left vertical coordinates.doubleGets signed width of this rectangle defined as the difference between its bottom-right and top-left horizontal coordinates.static doublegetSignedWidth(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.doublegetWidth()Gets width of this rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.static doubleGets width of a rectangle defined as the absolute difference between bottom-right and top-left horizontal coordinates.booleanisAtBottomLeftCorner(double x, double y) Indicates if provided point coordinates are located at bottom-left corner of this rectangle.booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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.booleanisAtBottomLeftCorner(Point2D point) Indicates if provided point is located at bottom-left corner of this rectangle.booleanisAtBottomLeftCorner(Point2D point, double threshold) Indicates if provided point is located at bottom-left corner of this rectangle up to a certain threshold.static booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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 booleanisAtBottomLeftCorner(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.booleanisAtBottomRightCorner(double x, double y) Indicates if provided point is located at bottom-right corner of this rectangle.booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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.booleanisAtBottomRightCorner(Point2D point) Indicates if provided point is located at bottom-right corner of this rectangle.booleanisAtBottomRightCorner(Point2D point, double threshold) Indicates if provided point is located at bottom-right corner of this rectangle.static booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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 booleanisAtBottomRightCorner(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.booleanisAtBottomSide(double x, double y) Indicates if provided point coordinates are located at bottom side of this rectangle.booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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.booleanisAtBottomSide(Point2D point) Indicates if provided point is located at bottom side of this rectangle.booleanisAtBottomSide(Point2D point, double threshold) Indicates if provided point is located at bottom side of this rectangle.static booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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 booleanisAtBottomSide(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.booleanisAtLeftSide(double x, double y) Indicates if provided point coordinates are located at left side of this rectangle.booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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.booleanisAtLeftSide(Point2D point) Indicates if provided point is located at left side of this rectangle.booleanisAtLeftSide(Point2D point, double threshold) Indicates if provided point is located at left side of this rectangle up to a certain threshold.static booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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 booleanisAtLeftSide(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.booleanisAtRightSide(double x, double y) Indicates if provided point coordinates are located at right side of this rectangle.booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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.booleanisAtRightSide(Point2D point) Indicates if provided point is located at right side of this rectangle.booleanisAtRightSide(Point2D point, double threshold) Indicates if provided point is located at right side of this rectangle up to a certain threshold.static booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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 booleanisAtRightSide(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.booleanisAtTopLeftCorner(double x, double y) Indicates if provided point coordinates are located at top-left corner of this rectangle.booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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.booleanisAtTopLeftCorner(Point2D point) Indicates if provided point is located at top-left corner of this rectangle.booleanisAtTopLeftCorner(Point2D point, double threshold) Indicates if provided point is located at top-left corner of this rectangle up to a certain threshold.static booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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 booleanisAtTopLeftCorner(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.booleanisAtTopRightCorner(double x, double y) Indicates if provided point coordinates are located at top-right corner of this rectangle.booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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.booleanisAtTopRightCorner(Point2D point) Indicates if provided point is located at top-right corner of this rectangle.booleanisAtTopRightCorner(Point2D point, double threshold) Indicates if provided point is located at top-right corner of this rectangle up to a certain threshold.static booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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 booleanisAtTopRightCorner(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.booleanisAtTopSide(double x, double y) Indicates if provided point coordinates are located at top side of this rectangle.booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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.booleanisAtTopSide(Point2D point) Indicates if provided point is located at top side of this rectangle.booleanisAtTopSide(Point2D point, double threshold) Indicates if provided point is located at top side of this rectangle up to a certain threshold.static booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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 booleanisAtTopSide(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.booleanisInside(double x, double y) Indicates if provided point coordinates are located inside this rectangle.booleanisInside(double x, double y, double threshold) Indicates if provided point coordinates are located inside this rectangle up to a certain threshold.static booleanisInside(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 booleanisInside(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 booleanIndicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.static booleanIndicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.booleanIndicates if provided point is located inside this rectangle.booleanIndicates if provided point is located inside this rectangle up to a certain threshold.static booleanIndicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates.static booleanIndicates if provided point is located inside the rectangle defined by top-left and bottom-right coordinates up to a certain threshold.static booleanIndicates if provided point is located inside the rectangle defined by provided center and size.static booleanIndicates if provided point is located inside the rectangle defined by provided center and size up to a certain threshold.static booleanIndicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners.static booleanIndicates if provided point is located inside the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.booleanisLocus(double x, double y) Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.booleanisLocus(double x, double y, double threshold) Indicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.static booleanisLocus(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 booleanisLocus(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 booleanIndicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size.static booleanIndicates whether provided point coordinates belong to the locus of the rectangle defined by provided center and size up to a certain threshold.static booleanIndicates whether provided point coordinates belong to the locus of the rectangle defined by provided top-left and bottom-right corners.static booleanIndicates 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.booleanIndicates whether provided point coordinates belong to the locus of this rectangle.booleanIndicates whether provided point coordinates belong to the locus of this rectangle up to a certain threshold.static booleanIndicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.static booleanIndicates 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 booleanIndicates whether provided point belongs to the locus of the rectangle defined by provided center and size.static booleanIndicates whether provided point belongs to the locus of the rectangle defined by provided center and size up to a certain threshold.static booleanIndicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners.static booleanIndicates whether provided point belongs to the locus of the rectangle defined by provided top-left and bottom-right corners up to a certain threshold.booleanisLocusToBottomSide(double x, double y) Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.booleanisLocusToBottomSide(double x, double y, double threshold) Indicates whether provided point coordinates belong to the locus of the bottom side of this rectangle.static booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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.booleanisLocusToBottomSide(Point2D point) Indicates whether provided point belongs to the locus of the bottom side of this rectangle.booleanisLocusToBottomSide(Point2D point, double threshold) Indicates whether provided point belongs to the locus of the bottom side of this rectangle.static booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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 booleanisLocusToBottomSide(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.booleanisLocusToLeftSide(double x, double y) Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.booleanisLocusToLeftSide(double x, double y, double threshold) Indicates whether provided point coordinates belong to the locus of the left side of this rectangle.static booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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.booleanisLocusToLeftSide(Point2D point) Indicates whether provided point belongs to the locus of the left side of this rectangle.booleanisLocusToLeftSide(Point2D point, double threshold) Indicates whether provided point belongs to the locus of the left side of this rectangle.static booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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 booleanisLocusToLeftSide(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.booleanisLocusToRightSide(double x, double y) Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.booleanisLocusToRightSide(double x, double y, double threshold) Indicates whether provided point coordinates belong to the locus of the right side of this rectangle.static booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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.booleanisLocusToRightSide(Point2D point) Indicates whether provided point belongs to the locus of the right side of this rectangle.booleanisLocusToRightSide(Point2D point, double threshold) Indicates whether provided point belongs to the locus of the right side of this rectangle.static booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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 booleanisLocusToRightSide(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.booleanisLocusToTopSide(double x, double y) Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.booleanisLocusToTopSide(double x, double y, double threshold) Indicates whether provided point coordinates belong to the locus of the top side of this rectangle.static booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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.booleanisLocusToTopSide(Point2D point) Indicates whether provided point belongs to the locus of the top side of this rectangle.booleanisLocusToTopSide(Point2D point, double threshold) Indicates whether provided point belongs to the locus of the top side of this rectangle.static booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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 booleanisLocusToTopSide(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.voidsetBottomRight(Point2D bottomRight) Sets bottom-right corner.final voidsetBounds(double left, double top, double right, double bottom) Sets rectangle boundaries.final voidSets rectangle boundariesvoidsetCenter(double centerX, double centerY) Sets center of this rectangle preserving its width and height.voidSets the center of this rectangle preserving its width and height.voidsetCenterAndSize(double centerX, double centerY, double width, double height) Sets center and size of this rectangle.voidsetCenterAndSize(Point2D center, double width, double height) Sets center and size (width and height) of this rectangle.voidsetTopLeft(Point2D topLeft) Sets top-left corner.toBox()Creates a 2D box instance equivalent to this rectangle.voidSets values into provided box instance to make it equivalent to this rectangle.
-
Field Details
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLDConstant defining default threshold value used when none is provided.- See Also:
-
topLeft
Top left coordinate of rectangle. -
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
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
Constructor from 2D box.- Parameters:
box- a 2D box.
-
-
Method Details
-
getTopLeft
Gets top-left corner.- Returns:
- top-left corner.
-
setTopLeft
Sets top-left corner.- Parameters:
topLeft- top-left corner.
-
getBottomRight
Gets bottom-right corner.- Returns:
- bottom-right corner.
-
setBottomRight
Sets bottom-right corner.- Parameters:
bottomRight- bottom-right corner.
-
setBounds
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
Gets center of rectangle.- Parameters:
topLeft- top-left coordinates.bottomRight- bottom-right coordinates.result- instance where center of rectangle will be stored.
-
getCenter
Gets center of rectangle.- Parameters:
left- left coordinate.top- top coordinateright- right coordinate.bottom- bottom coordinate.result- instance where center of rectangle will be stored.
-
getCenter
Gets center of rectangle.- Parameters:
topLeft- top-left coordinates.bottomRight- bottom-right coordinates.- Returns:
- center of rectangle.
-
getCenter
Gets center of rectangle.- Parameters:
left- left coordinate.top- top coordinate.right- right coordinate.bottom- bottom coordinate.- Returns:
- center of rectangle.
-
getCenter
Gets center of rectangle.- Parameters:
result- instance where coordinates of center of rectangle will be stored.
-
getCenter
Gets center of rectangle.- Returns:
- a new point containing center of rectangle.
-
fromBox
Sets values of this rectangle from provided 2D box.- Parameters:
box- a 2D box containing rectangle boundaries.
-
toBox
Creates a 2D box instance equivalent to this rectangle.- Returns:
- a new 2D box instance equivalent to this rectangle.
-
toBox
Sets values into provided box instance to make it equivalent to this rectangle.- Parameters:
result- instance where values will be stored.
-
getSignedWidth
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
-