Constants

COMPARAISON_PRECISION

COMPARAISON_PRECISION

Precision of size comparison

A_POINT

A_POINT

A point

B_POINT

B_POINT

B point

C_POINT

C_POINT

C point

AB_SIDE

AB_SIDE

AB side

AC_SIDE

AC_SIDE

AC side

BC_SIDE

BC_SIDE

BC side

Properties

Methods

getPoint()

getPoint(integer  $index) : \Tazorax\MathUtils\TwoD\Point2d

Get point at index

Parameters

integer $index

Throws

\Tazorax\MathUtils\Exception

Returns

\Tazorax\MathUtils\TwoD\Point2d

pointsCount()

pointsCount() : integer

Get the number of points in this polygon

Returns

integer

getPerimeter()

getPerimeter() : float

Get perimeter

Throws

\Tazorax\MathUtils\Exception

Returns

float

getHighSide()

getHighSide() : integer

Get the highest side.

If sizes are same, AB or AC side will return first

Returns

integer

isRight()

isRight() : boolean

Determines if this triangle is right

Returns

boolean

isIsosceles()

isIsosceles() : boolean

Determines if this triangle is isosceles

Returns

boolean

isEquilateral()

isEquilateral() : boolean

Determines if this triangle is equilateral

Returns

boolean

getSideSizes()

getSideSizes() : array

Get size of all sides

Returns

array

getRoundedSideSizes()

getRoundedSideSizes() : array

Get rounded size of all sides

Returns

array

getArea()

getArea() : float

Get triangle area

Returns

float

checkPoints()

checkPoints() 

Checks if it is a polygon (with 3 points min.)

Throws

\Tazorax\MathUtils\Exception