Package me.autobot.lib.math.objects
Class Rectangle
java.lang.Object
me.autobot.lib.math.objects.Rectangle
Rectangle object with position, size, and rotation.
-
Constructor Details
-
Rectangle
Creates a new rectangle with the given position and size.- Parameters:
position
- The position of the rectangle, from the center.size
- The size of the rectangle.
-
Rectangle
Creates a new rectangle with the given position, size, and rotation.- Parameters:
position
- The position of the rectangle, from the center.size
- The size of the rectangle.rotation
- The rotation of the rectangle.
-
-
Method Details
-
getPosition
Gets the center position of the rectangle.- Returns:
- The center position of the rectangle.
-
getSize
Gets the size of the rectangle.- Returns:
- The size of the rectangle.
-
getRotation
Gets the rotation of the rectangle.- Returns:
- The rotation of the rectangle.
-
getVertices
Returns the vertices of the rectangle.- Returns:
- The vertices of the rectangle. 0: Top right 1: Bottom right 2: Bottom left 3: Top left
-