Browse Source

Quaternion: Use Number.EPSILON in setFromUnitVectors(). (#21484)

Michael Herzog 4 years ago
parent
commit
a3114f0e3d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/math/Quaternion.js

+ 3 - 3
src/math/Quaternion.js

@@ -363,11 +363,11 @@ class Quaternion {
 
 		// assumes direction vectors vFrom and vTo are normalized
 
-		const EPS = 0.000001;
-
 		let r = vFrom.dot( vTo ) + 1;
 
-		if ( r < EPS ) {
+		if ( r < Number.EPSILON ) {
+
+			// vFrom and vTo point in opposite directions
 
 			r = 0;