Skip to content

Commit 242471b

Browse files
author
yp
committed
Renamed no longer existing Vector2/3 .sub and .len to .subtract and .length where still used
1 parent bab399a commit 242471b

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/camera/3d/Camera3D.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ var Camera3D = new Class({
298298
dir.set(x, y, z);
299299
}
300300

301-
dir.sub(this.position).normalize();
301+
dir.subtract(this.position).normalize();
302302

303303
// Calculate right vector
304304
tmpVec3.copy(dir).cross(up).normalize();
@@ -319,7 +319,7 @@ var Camera3D = new Class({
319319

320320
rotateAround: function (point, radians, axis)
321321
{
322-
tmpVec3.copy(point).sub(this.position);
322+
tmpVec3.copy(point).subtract(this.position);
323323

324324
this.translate(tmpVec3);
325325
this.rotate(radians, axis);
@@ -391,7 +391,7 @@ var Camera3D = new Class({
391391

392392
direction.unproject(viewport, mtx);
393393

394-
direction.sub(origin).normalize();
394+
direction.subtract(origin).normalize();
395395

396396
return this.ray;
397397
},
@@ -419,7 +419,7 @@ var Camera3D = new Class({
419419
var dir = dirvec.set(this.direction).negate();
420420

421421
// Better view-aligned billboards might use this:
422-
// var dir = tmp.set(camera.position).sub(p).normalize();
422+
// var dir = tmp.set(camera.position).subtract(p).normalize();
423423

424424
var right = rightvec.set(this.up).cross(dir).normalize();
425425
var up = tmpVec3.set(dir).cross(right).normalize();

src/curves/curve/inc/GetTangent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var GetTangent = function (t, out)
3939
this.getPoint(t1, this._tmpVec2A);
4040
this.getPoint(t2, out);
4141

42-
return out.sub(this._tmpVec2A).normalize();
42+
return out.subtract(this._tmpVec2A).normalize();
4343
};
4444

4545
module.exports = GetTangent;

src/curves/line/LineCurve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var LineCurve = new Class({
5959
return out.copy(this.p1);
6060
}
6161

62-
out.copy(this.p1).sub(this.p0).scale(t).add(this.p0);
62+
out.copy(this.p1).subtract(this.p0).scale(t).add(this.p0);
6363

6464
return out;
6565
},
@@ -72,7 +72,7 @@ var LineCurve = new Class({
7272

7373
getTangent: function ()
7474
{
75-
var tangent = tmpVec2.copy(this.p1).sub(this.p0);
75+
var tangent = tmpVec2.copy(this.p1).subtract(this.p0);
7676

7777
return tangent.normalize();
7878
},

src/curves/path/inc/EllipseTo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var EllipseTo = function (xRadius, yRadius, startAngle, endAngle, clockwise, rot
2626
// Calculate where to center the ellipse
2727
var start = ellipse.getStartPoint(this._tmpVec2B);
2828

29-
end.sub(start);
29+
end.subtract(start);
3030

3131
ellipse.x = end.x;
3232
ellipse.y = end.y;

src/math/Quaternion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ var Quaternion = new Class({
168168

169169
if (dot < -0.999999)
170170
{
171-
if (tmpvec.copy(xUnitVec3).cross(a).len() < EPSILON)
171+
if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)
172172
{
173173
tmpvec.copy(yUnitVec3).cross(a);
174174
}

0 commit comments

Comments
 (0)