Skip to content

Commit 6bc39a8

Browse files
committed
More sensible property names
1 parent ba2f351 commit 6bc39a8

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

v3/src/paths/curves/ellipse/EllipseCurve.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@ var EllipseCurve = new Class({
1313

1414
initialize:
1515

16-
function EllipseCurve (aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation)
16+
function EllipseCurve (x, y, xRadius, yRadius, startAngle, endAngle, clockwise, rotation)
1717
{
1818
if (yRadius === undefined) { yRadius = xRadius; }
19-
if (aStartAngle === undefined) { aStartAngle = 0; }
20-
if (aEndAngle === undefined) { aEndAngle = 360; }
21-
if (aClockwise === undefined) { aClockwise = false; }
22-
if (aRotation === undefined) { aRotation = 0; }
19+
if (startAngle === undefined) { startAngle = 0; }
20+
if (endAngle === undefined) { endAngle = 360; }
21+
if (clockwise === undefined) { clockwise = false; }
22+
if (rotation === undefined) { rotation = 0; }
2323

2424
Curve.call(this);
2525

26-
this.aX = aX;
27-
this.aY = aY;
26+
this.x = x;
27+
this.y = y;
2828

2929
this.xRadius = xRadius;
3030
this.yRadius = yRadius;
3131

3232
// Radians
33-
this.aStartAngle = DegToRad(aStartAngle);
34-
this.aEndAngle = DegToRad(aEndAngle);
33+
this.startAngle = DegToRad(startAngle);
34+
this.endAngle = DegToRad(endAngle);
3535

3636
// Boolean (anti-clockwise direction)
37-
this.aClockwise = aClockwise;
37+
this.clockwise = clockwise;
3838

3939
// The rotation of the arc
40-
this.aRotation = DegToRad(aRotation);
40+
this.rotation = DegToRad(rotation);
4141
},
4242

4343
getResolution: function (divisions)
@@ -50,7 +50,7 @@ var EllipseCurve = new Class({
5050
if (out === undefined) { out = new Vector2(); }
5151

5252
var twoPi = Math.PI * 2;
53-
var deltaAngle = this.aEndAngle - this.aStartAngle;
53+
var deltaAngle = this.endAngle - this.startAngle;
5454
var samePoints = Math.abs( deltaAngle ) < Number.EPSILON;
5555

5656
// ensures that deltaAngle is 0 .. 2 PI
@@ -76,7 +76,7 @@ var EllipseCurve = new Class({
7676
}
7777
}
7878

79-
if (this.aClockwise && ! samePoints)
79+
if (this.clockwise && ! samePoints)
8080
{
8181
if (deltaAngle === twoPi)
8282
{
@@ -88,21 +88,21 @@ var EllipseCurve = new Class({
8888
}
8989
}
9090

91-
var angle = this.aStartAngle + t * deltaAngle;
92-
var x = this.aX + this.xRadius * Math.cos(angle);
93-
var y = this.aY + this.yRadius * Math.sin(angle);
91+
var angle = this.startAngle + t * deltaAngle;
92+
var x = this.x + this.xRadius * Math.cos(angle);
93+
var y = this.y + this.yRadius * Math.sin(angle);
9494

95-
if (this.aRotation !== 0)
95+
if (this.rotation !== 0)
9696
{
97-
var cos = Math.cos(this.aRotation);
98-
var sin = Math.sin(this.aRotation);
97+
var cos = Math.cos(this.rotation);
98+
var sin = Math.sin(this.rotation);
9999

100-
var tx = x - this.aX;
101-
var ty = y - this.aY;
100+
var tx = x - this.x;
101+
var ty = y - this.y;
102102

103103
// Rotate the point about the center of the ellipse.
104-
x = tx * cos - ty * sin + this.aX;
105-
y = tx * sin + ty * cos + this.aY;
104+
x = tx * cos - ty * sin + this.x;
105+
y = tx * sin + ty * cos + this.y;
106106
}
107107

108108
return out.set(x, y);

0 commit comments

Comments
 (0)