Constructor
new RightTriangle(center, base_length, height, rotationopt, flipopt)
Creates a new RightTriangle from a center point, base length, height, rotation, and flip.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
center | Point2D | The center Point2D of the right triangle. | |
base_length | number | The base length of the right triangle. | |
height | number | The height of the right triangle. | |
rotation | number | | <optional> | The rotation of the right triangle, if any. |
flip | boolean | | <optional> | The flip of the right triangle, by default false. |
- Source
Classes
Members
area
Returns the area of the right triangle.
- Source
base_length
Returns the base length of the right triangle.
- Source
center
Returns the center Point2D of the right triangle.
- Source
height
Returns the height of the right triangle.
- Source
hypotenuse
Returns the hypotenuse of the RightTriangle.
- Source
perimeter
Returns the perimeter of the RightTriangle.
- Source
triangle
Creates a Triangle from the right triangle.
- Source
vector_object_builder
Creates a VectorObjectBuilder from the right triangle.
- Source