Constructor and Description |
---|
Rectangle2D(double x1,
double y1,
double x2,
double y2)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y) |
void |
extend(double x,
double y)
Makes sure the provided point is part of the extended
Rectangle2D by
moving the right or left border to include y and moving the top or bottom border
to include y. |
double |
getBottom() |
double |
getLeft() |
boolean |
isEmpty() |
String |
toString() |
public Rectangle2D(double x1, double y1, double x2, double y2)
x1
- x value of the first cornery1
- y value of the first cornerx2
- x value of the second cornery2
- y value of the second cornerpublic double getLeft()
public double getBottom()
public boolean contains(double x, double y)
public void extend(double x, double y)
Rectangle2D
by
moving the right or left border to include y and moving the top or bottom border
to include y.x
- the x position to includey
- the y position to includepublic boolean isEmpty()
Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.