Browse Source

Add subScalar()

Corey Birnbaum 10 years ago
parent
commit
5ff22c17f2
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/math/Vector3.js

+ 10 - 0
src/math/Vector3.js

@@ -142,6 +142,16 @@ THREE.Vector3.prototype = {
 		return this;
 		return this;
 
 
 	},
 	},
+	
+	subScalar: function ( s ) {
+
+		this.x -= s;
+		this.y -= s;
+		this.z -= s;
+
+		return this;
+
+	},
 
 
 	subVectors: function ( a, b ) {
 	subVectors: function ( a, b ) {