Class Rectangle
java.lang.Object
eu.svjatoslav.sixth.e3d.geometry.Rectangle
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the height of the rectangle (distance along the Y-axis).doubleReturns the leftmost X coordinate of the rectangle.doubleReturns the topmost Y coordinate of the rectangle.doublegetWidth()Returns the width of the rectangle (distance along the X-axis).
-
Field Details
-
p1
The corner points of the rectangle (opposite corners). -
p2
The corner points of the rectangle (opposite corners).
-
-
Constructor Details
-
Rectangle
public Rectangle(double size) Creates a square rectangle centered at the origin with the specified size.- Parameters:
size- the width and height of the square
-
Rectangle
-
-
Method Details
-
getHeight
public double getHeight()Returns the height of the rectangle (distance along the Y-axis).- Returns:
- the height (always positive)
-
getLowerX
public double getLowerX()Returns the leftmost X coordinate of the rectangle.- Returns:
- the minimum X value
-
getLowerY
public double getLowerY()Returns the topmost Y coordinate of the rectangle.- Returns:
- the minimum Y value
-
getWidth
public double getWidth()Returns the width of the rectangle (distance along the X-axis).- Returns:
- the width (always positive)
-