RightTriangle

A RightTriangle is a triangle in which one angle is a right angle.

Constructor

new RightTriangle(center, base_length, height, rotationopt, flipopt)

Creates a new RightTriangle from a center point, base length, height, rotation, and flip.

Parameters:
NameTypeAttributesDescription
centerPoint2D

The center Point2D of the right triangle.

base_lengthnumber

The base length of the right triangle.

heightnumber

The height of the right triangle.

rotationnumber | null<optional>

The rotation of the right triangle, if any.

flipboolean | null<optional>

The flip of the right triangle, by default false.

Classes

RightTriangle

Members

area

Returns the area of the right triangle.

base_length

Returns the base length of the right triangle.

center

Returns the center Point2D of the right triangle.

height

Returns the height of the right triangle.

hypotenuse

Returns the hypotenuse of the RightTriangle.

perimeter

Returns the perimeter of the RightTriangle.

triangle

Creates a Triangle from the right triangle.

vector_object_builder

Creates a VectorObjectBuilder from the right triangle.