Constructor
new Circle(centre, radius)
Name | Type | Description |
---|---|---|
centre | Point2D | A Point2D representing the centre of the circle. |
radius | number | The radius of the circle. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Circle | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getCenter() → {Point2D}
Get the centre (point) of the circle.
- Source
The center (point) of the circle.
- Type:
- Point2D
getRadius() → {number}
Get the radius of the circle.
- Source
The radius of the circle.
- Type:
- number
getRound() → {Array.<Array.<Array.<number>>>}
Get the rounded limits of the circle.
See: https://en.wikipedia.org/wiki/Circle#Equations.
Circle formula: x*x + y*y = r*r
.
Implies: y = (+-) sqrt(r*r - x*x)
.
- Source
The rounded limits: list of [x, y] pairs (min, max).
- Type:
- Array.<Array.<Array.<number>>>
getSurface() → {number}
Get the surface of the circle.
- Source
The surface of the circle.
- Type:
- number
getWorldSurface(spacing2D) → {number}
Get the surface of the circle according to a spacing.
Name | Type | Description |
---|---|---|
spacing2D | Scalar2D | The 2D spacing. |
- Source
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.
Name | Type | Description |
---|---|---|
viewController | ViewController | The associated view controller. |
flags | Array.<string> | A list of stat values to calculate. |
- Source
A quantification object.
- Type:
- object