提交 a963e2dc 编写于 作者: B Ben Houston

remove lazy-conditions.

上级 a1ac92db
......@@ -118,7 +118,7 @@ THREE.Vector2.prototype = {
divideScalar: function ( s ) {
if ( s ) {
if ( s !== 0 ) {
this.x /= s;
this.y /= s;
......@@ -244,7 +244,7 @@ THREE.Vector2.prototype = {
var oldLength = this.length();
if( oldLength ) {
if ( oldLength !== 0 && l !== oldLength ) {
this.multiplyScalar( l / oldLength );
}
......
......@@ -168,7 +168,7 @@ THREE.Vector3.prototype = {
divideScalar: function ( s ) {
if ( s ) {
if ( s !== 0 ) {
this.x /= s;
this.y /= s;
......@@ -312,7 +312,7 @@ THREE.Vector3.prototype = {
var oldLength = this.length();
if( oldLength ) {
if ( oldLength !== 0 && l !== oldLength ) {
this.multiplyScalar( l / oldLength );
}
......
......@@ -153,7 +153,7 @@ THREE.Vector4.prototype = {
divideScalar: function ( s ) {
if ( s ) {
if ( s !== 0 ) {
this.x /= s;
this.y /= s;
......@@ -321,7 +321,7 @@ THREE.Vector4.prototype = {
var oldLength = this.length();
if( oldLength ) {
if ( oldLength !== 0 && l !== oldLength ) {
this.multiplyScalar( l / oldLength );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册