Circle

Circle shape.

Constructor

new Circle(centre, radius)

Parameters:
NameTypeDescription
centrePoint2D

A Point2D representing the centre of the circle.

radiusnumber

The radius of the circle.

Classes

Circle

Methods

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsCircle

The object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

getCenter() → {Point2D}

Get the centre (point) of the circle.

Returns:

The center (point) of the circle.

Type: 
Point2D

getRadius() → {number}

Get the radius of the circle.

Returns:

The radius of the circle.

Type: 
number

getRound() → {Array}

Get the rounded limits of the circle. (see https://en.wikipedia.org/wiki/Circle#Equations) Circle formula: xx + yy = rr => y = (+-) sqrt(rr - x*x)

Returns:

The rounded limits.

Type: 
Array

getSurface() → {number}

Get the surface of the circle.

Returns:

The surface of the circle.

Type: 
number

getWorldSurface(spacingX, spacingY) → {number}

Get the surface of the circle according to a spacing.

Parameters:
NameTypeDescription
spacingXnumber

The X spacing.

spacingYnumber

The Y spacing.

Returns:

The surface of the circle multiplied by the given spacing or null for null spacings.

Type: 
number

quantify(viewController, flags) → {object}

Quantify an circle according to view information.

Parameters:
NameTypeDescription
viewControllerViewController

The associated view controller.

flagsArray

A list of stat values to calculate.

Returns:

A quantification object.

Type: 
object