public class Rectangles extends Object
Constructor and Description |
---|
Rectangles() |
Modifier and Type | Method and Description |
---|---|
static Point |
closestInteriorPoint(IRectangle r,
IPoint p)
Computes and returns the point inside the bounds of the rectangle that's closest to the
given point.
|
static Point |
closestInteriorPoint(IRectangle r,
IPoint p,
Point out)
Computes the point inside the bounds of the rectangle that's closest to the given point,
writing the result into
out . |
static void |
intersect(IRectangle src1,
IRectangle src2,
Rectangle dst)
Intersects the supplied two rectangles, writing the result into
dst . |
static double |
pointRectDistance(IRectangle r,
IPoint p)
Returns the Euclidean distance between the given point and the nearest point inside the
bounds of the given rectangle.
|
static double |
pointRectDistanceSq(IRectangle r,
IPoint p)
Returns the squared Euclidean distance between the given point and the nearest point inside
the bounds of the given rectangle.
|
static void |
union(IRectangle src1,
IRectangle src2,
Rectangle dst)
Unions the supplied two rectangles, writing the result into
dst . |
public static void intersect(IRectangle src1, IRectangle src2, Rectangle dst)
dst
.public static void union(IRectangle src1, IRectangle src2, Rectangle dst)
dst
.public static Point closestInteriorPoint(IRectangle r, IPoint p, Point out)
out
.out
for call chaining convenience.public static Point closestInteriorPoint(IRectangle r, IPoint p)
public static double pointRectDistanceSq(IRectangle r, IPoint p)
public static double pointRectDistance(IRectangle r, IPoint p)
Copyright © 2017. All rights reserved.