Constructor
new Triangle(a, b, c)
Creates a new Triangle object from three points.
Parameters:
Name | Type | Description |
---|---|---|
a | Point2D | The first vertex of the triangle as Point2D. |
b | Point2D | The second vertex of the triangle as Point2D. |
c | Point2D | The third vertex of the triangle as Point2D. |
- Source
Classes
Members
a
Returns the first vertex of the triangle as Point2D.
- Source
area
Returns the area of the triangle.
- Source
b
Returns the second vertex of the triangle as Point2D.
- Source
c
Returns the third vertex of the triangle as Point2D.
- Source
perimeter
Returns the perimeter of the triangle.
- Source
Methods
vector_object_builder() → {VectorObjectBuilder}
Creates a VectorObjectBuilder with the triangle's points.
- Source
Returns:
A VectorObjectBuilder with the triangle's points.
- Type:
- VectorObjectBuilder