|
@@ -90,19 +90,19 @@ THREE.Vector2.prototype = {
|
|
|
|
|
|
},
|
|
|
|
|
|
- addVectors: function ( a, b ) {
|
|
|
+ addScalar: function ( s ) {
|
|
|
|
|
|
- this.x = a.x + b.x;
|
|
|
- this.y = a.y + b.y;
|
|
|
+ this.x += s;
|
|
|
+ this.y += s;
|
|
|
|
|
|
return this;
|
|
|
|
|
|
},
|
|
|
|
|
|
- addScalar: function ( s ) {
|
|
|
+ addVectors: function ( a, b ) {
|
|
|
|
|
|
- this.x += s;
|
|
|
- this.y += s;
|
|
|
+ this.x = a.x + b.x;
|
|
|
+ this.y = a.y + b.y;
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -124,6 +124,15 @@ THREE.Vector2.prototype = {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ subScalar: function ( s ) {
|
|
|
+
|
|
|
+ this.x -= s;
|
|
|
+ this.y -= s;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
subVectors: function ( a, b ) {
|
|
|
|
|
|
this.x = a.x - b.x;
|