Constructor
new Square(center, side_length, rotationopt)
Creates a new Square from a center point, side length, and optional rotation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
center | Point2D | The center point of the square as a Point2D. | |
side_length | number | The side length of the square. | |
rotation | number | | <optional> | The rotation of the square, if any. |
- Source
Classes
Members
area
Returns the area of the square.
- Source
center
Returns the center point of the square.
- Source
perimeter
Returns the perimeter of the square.
- Source
rectangle
Creates a new Rectangle from the square.
- Source
rotation
Returns the rotation of the square.
- Source
side_length
Returns the side length of the square.
- Source
vector_object_builder
Creates a VectorObjectBuilder from the square.
- Source