Browse Source

Added multiplyScalar and divideScalar to Vector4.

Julian Walker 14 years ago
parent
commit
1f0b44a860
1 changed files with 22 additions and 0 deletions
  1. 22 0
      src/core/Vector4.js

+ 22 - 0
src/core/Vector4.js

@@ -79,6 +79,28 @@ THREE.Vector4.prototype = {
 		return this;
 
 	},
+	
+	multiplyScalar: function ( s ) {
+
+		this.x *= s;
+		this.y *= s;
+		this.z *= s;
+		this.w *= s;
+
+		return this;
+
+	},
+
+	divideScalar: function ( s ) {
+
+		this.x /= s;
+		this.y /= s;
+		this.z /= s;
+		this.w /= s;
+
+		return this;
+
+	},
 
 	clone: function () {