\Tazorax\MathUtils\TwoDPolygon

Represents a polygon (geometric form)

Summary

Methods
Properties
Constants
__construct()
addPoint()
getPoint()
setPoint()
pointsCount()
getPerimeter()
translate()
No public properties found
COMPARAISON_PRECISION
No protected methods found
$_points
N/A
checkPoints()
No private properties found
N/A

Constants

COMPARAISON_PRECISION

COMPARAISON_PRECISION

Precision of size comparison

Properties

Methods

__construct()

__construct() 

Polygon constructor.

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

checkPoints()

checkPoints() 

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

Throws

\Tazorax\MathUtils\Exception