EllipseCurve constructor

EllipseCurve(
  1. dynamic aX,
  2. dynamic aY,
  3. dynamic xRadius,
  4. dynamic yRadius, [
  5. dynamic aStartAngle,
  6. dynamic aEndAngle,
  7. dynamic aClockwise,
  8. dynamic aRotation,
])

aX – The X center of the ellipse. Default is 0.

aY – The Y center of the ellipse. Default is 0.

xRadius – The radius of the ellipse in the x direction. Default is 1.

yRadius – The radius of the ellipse in the y direction. Default is 1.

aStartAngle – The start angle of the curve in radians starting from the positive X axis. Default is 0.

aEndAngle – The end angle of the curve in radians starting from the positive X axis. Default is 2 x Math.PI.

aClockwise – Whether the ellipse is drawn clockwise. Default is false.

aRotation – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is 0.

Implementation

EllipseCurve(aX, aY, xRadius, yRadius, [aStartAngle, aEndAngle, aClockwise, aRotation]) {

  this.aX = aX ?? 0;
  this.aY = aY ?? 0;

  this.xRadius = xRadius ?? 1;
  this.yRadius = yRadius ?? 1;

  this.aStartAngle = aStartAngle ?? 0;
  this.aEndAngle = aEndAngle ?? 2 * math.pi;

  this.aClockwise = aClockwise ?? false;

  this.aRotation = aRotation ?? 0;

  isEllipseCurve = true;
}