RectHV Class |
Namespace: Algs4Net
public sealed class RectHV : BasicVisual
The RectHV type exposes the following members.
Name | Description | |
---|---|---|
Height |
Returns the height of this rectangle. | |
Width |
Returns the width of this rectangle. | |
Xmax |
Returns the maximum X-coordinate of any point in this rectangle. | |
Xmin |
Returns the minimum X-coordinate of any point in this rectangle. | |
Ymax |
Returns the maximum Y-coordinate of any point in this rectangle. | |
Ymin |
Returns the minimum Y-coordinate of any point in this rectangle. |
Name | Description | |
---|---|---|
Contains |
Returns true if this rectangle contain the point. | |
DistanceSquaredTo |
Returns the square of the Euclidean distance between this rectangle and the point p. | |
DistanceTo |
Returns the Euclidean distance between this rectangle and the point p. | |
Draw |
Draws this rectangle to standard draw. (Overrides BasicVisualDraw.) | |
Equals |
Compares this rectangle to the specified rectangle. (Overrides ObjectEquals(Object).) | |
GetHashCode |
Returns an integer hash code for this rectangle. (Overrides ObjectGetHashCode.) | |
Intersects |
Returns true if the two rectangles intersect. | |
MainTest |
Demo test for the RectHVTest data type. | |
ToString |
Returns a string representation of this rectangle. (Overrides ObjectToString.) |
For additional documentation, see Section 1.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class RectHV implementation by the respective authors.