Constructor
new Ellipse(centre, a, b)
Name | Type | Description |
---|---|---|
centre | Point2D | A Point2D representing the centre of the ellipse. |
a | number | The radius of the ellipse on the horizontal axe. |
b | number | The radius of the ellipse on the vertical axe. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Ellipse | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getA() → {number}
Get the radius of the ellipse on the horizontal axe.
- Source
The radius of the ellipse on the horizontal axe.
- Type:
- number
getB() → {number}
Get the radius of the ellipse on the vertical axe.
- Source
The radius of the ellipse on the vertical axe.
- Type:
- number
getCenter() → {Point2D}
Get the centre (point) of the ellipse.
- Source
The center (point) of the ellipse.
- Type:
- Point2D
getRound() → {Array}
Get the rounded limits of the ellipse. (see https://en.wikipedia.org/wiki/Ellipse#Standard_equation) Ellipse formula: xx / aa + yy / bb = 1 => y = (+-)(b/a) * sqrt(aa - xx)
- Source
The rounded limits.
- Type:
- Array
getSurface() → {number}
Get the surface of the ellipse.
- Source
The surface of the ellipse.
- Type:
- number
getWorldSurface(spacingX, spacingY) → {number}
Get the surface of the ellipse according to a spacing.
Name | Type | Description |
---|---|---|
spacingX | number | The X spacing. |
spacingY | number | The Y spacing. |
- Source
The surface of the ellipse multiplied by the given spacing or null for null spacings.
- Type:
- number
quantify(viewController, flags) → {object}
Quantify an ellipse according to view information.
Name | Type | Description |
---|---|---|
viewController | ViewController | The associated view controller. |
flags | Array | A list of stat values to calculate. |
- Source
A quantification object.
- Type:
- object