Protractor

Protractor shape: 3 points from which to calculate an angle.

Constructor

new Protractor(points)

Parameters:
NameTypeDescription
pointsArray.<Point2D>

The list of Point2D that make the protractor.

Classes

Protractor

Methods

getCentroid() → {Point2D}

Get the centroid of the protractor.

Returns:

THe centroid point.

Type: 
Point2D

getLength() → {number}

Get the length of the path (should be 3).

Returns:

The length of the path.

Type: 
number

getPoint(index) → {Point2D|undefined}

Get a point of the list.

Parameters:
NameTypeDescription
indexnumber

The index of the point to get (beware, no size check).

Returns:

The Point2D at the given index.

Type: 
Point2D | undefined

quantify(_viewController, _flags) → {object}

Quantify a path according to view information.

Parameters:
NameTypeDescription
_viewControllerViewController

The associated view controller.

_flagsArray.<string>

A list of stat values to calculate.

Returns:

A quantification object.

Type: 
object