We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1ed817 commit f2c9797Copy full SHA for f2c9797
src/math/Quaternion.js
@@ -393,21 +393,11 @@ Object.assign( Quaternion.prototype, {
393
394
}(),
395
396
- angleTo: function () {
+ angleTo: function ( q ) {
397
398
- var p = new Quaternion();
+ return 2 * Math.acos( Math.abs( this.dot( q ) ) );
399
400
- return function angleTo( q ) {
401
-
402
- p.copy( this ).inverse();
403
404
- p.premultiply( q );
405
406
- return 2 * Math.acos( p.w );
407
408
- };
409
410
- }(),
+ },
411
412
inverse: function () {
413
0 commit comments