ABORT ABORT ABORT

beta.r3js.org
polygonboutique 2016-11-22 16:10:03 +01:00
parent 2382e2a1d5
commit 87471b1b12
1 changed files with 9 additions and 1 deletions

View File

@ -12,6 +12,14 @@ GameLib.D3.Vector3.prototype.subtract = function (v) {
);
};
GameLib.D3.Vector3.prototype.sub = function (v) {
return new GameLib.D3.Vector3(
this.x - v.x,
this.y - v.y,
this.z - v.z
);
};
GameLib.D3.Vector3.prototype.cross = function (v) {
return new GameLib.D3.Vector3(
this.y * v.z - this.z * v.y,
@ -137,7 +145,7 @@ GameLib.D3.Vector3.prototype.multiply = function (s) {
z
);
} else if(isNumber(s)) {
} else if(!isNaN(parseFloat(s)) && isFinite(s)) {
return new GameLib.D3.Vector3(
this.x * s,