Constructor GeoEllipse2
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoEllipse2(GeoPoint2, GeoVector2, double, double)
Initializes an ellipse from its centre, the direction of its major axis and its two radii.
public GeoEllipse2(GeoPoint2 center, GeoVector2 majorAxis, double majorRadius, double minorRadius)
Parameters
centerGeoPoint2The centre.
majorAxisGeoVector2The direction of the major axis, of any length but nought; it is normalized.
majorRadiusdoubleHalf the length of the major axis; a positive number, no less than the minor radius.
minorRadiusdoubleHalf the length of the minor axis; a positive number.
Exceptions
- ArgumentOutOfRangeException
Thrown when a radius is not a positive number, or the minor radius is larger than the major one. The two are not swapped: an ellipse longer across than along is given by an axis a quarter turned.
- ArgumentException
Thrown when the axis has no length, or is not a finite vector.