Return 'this' in Vector2/3::ScaleInPlace/Normalize for easy chaining
@@ -327,6 +327,7 @@
Vector2.prototype.scaleInPlace = function (scale) {
this.x *= scale;
this.y *= scale;
+ return this;
};
Vector2.prototype.scale = function (scale) {
@@ -357,6 +358,8 @@
this.x *= num;
this.y *= num;
+
Vector2.prototype.clone = function () {
@@ -549,6 +552,7 @@
this.z *= scale;
Vector3.prototype.scale = function (scale) {
@@ -642,6 +646,8 @@
this.z *= num;
Vector3.prototype.clone = function () {
@@ -293,6 +293,7 @@
public scaleInPlace(scale: number): void {
}
public scale(scale: number): Vector2 {
@@ -323,6 +324,8 @@
public clone(): Vector2 {
@@ -516,6 +519,7 @@
public scale(scale: number): Vector3 {
@@ -605,6 +609,8 @@
public clone(): Vector3 {