Class: Triangle

Triangle

new Triangle(v1, v2, v3)

Name Type Description
v1 Vector The first position
v2 Vector The second position
v3 Vector The third position
Properties:
Name Type Description
verticies Vector The three verticies

Extends

Methods

Get the centroid of the polygon. This is the vector average of all the points that make up the polygon.
Returns:
Type Description
Vector The centroid of the polygon
Get the polygon inset of the current polygon by the input ammount
Name Type Description
ammount
Returns:
Type Description
Polygon The inset of the current polygon by

inherited isConvex(){boolean}

Returns wheither or not this polygon is a convex polygon. If this is not true then the polygon is convace or more complex.
Returns:
Type Description
boolean If the polygon is convex