Skip to content

Commit d4e7eb8

Browse files
Mugen87mrdoob
authored andcommitted
Vector4: Remove bad line breaking (mrdoob#8656)
1 parent 809fbd9 commit d4e7eb8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/math/Vector4.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ THREE.Vector4.prototype = {
299299
m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],
300300
m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];
301301

302-
if ( ( Math.abs( m12 - m21 ) < epsilon )
303-
&& ( Math.abs( m13 - m31 ) < epsilon )
304-
&& ( Math.abs( m23 - m32 ) < epsilon ) ) {
302+
if ( ( Math.abs( m12 - m21 ) < epsilon ) &&
303+
( Math.abs( m13 - m31 ) < epsilon ) &&
304+
( Math.abs( m23 - m32 ) < epsilon ) ) {
305305

306306
// singularity found
307307
// first check for identity matrix which must have +1 for all terms
308308
// in leading diagonal and zero in other terms
309309

310-
if ( ( Math.abs( m12 + m21 ) < epsilon2 )
311-
&& ( Math.abs( m13 + m31 ) < epsilon2 )
312-
&& ( Math.abs( m23 + m32 ) < epsilon2 )
313-
&& ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {
310+
if ( ( Math.abs( m12 + m21 ) < epsilon2 ) &&
311+
( Math.abs( m13 + m31 ) < epsilon2 ) &&
312+
( Math.abs( m23 + m32 ) < epsilon2 ) &&
313+
( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {
314314

315315
// this singularity is identity matrix so angle = 0
316316

@@ -395,9 +395,9 @@ THREE.Vector4.prototype = {
395395

396396
// as we have reached here there are no singularities so we can handle normally
397397

398-
var s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 )
399-
+ ( m13 - m31 ) * ( m13 - m31 )
400-
+ ( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize
398+
var s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) +
399+
( m13 - m31 ) * ( m13 - m31 ) +
400+
( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize
401401

402402
if ( Math.abs( s ) < 0.001 ) s = 1;
403403

0 commit comments

Comments
 (0)