未验证 提交 b6870df3 编写于 作者: M Mr.doob 提交者: GitHub

Vector3: Clarified angleTo() error message.

上级 660d3208
......@@ -555,11 +555,9 @@ Object.assign( Vector3.prototype, {
angleTo: function ( v ) {
// assumes this and v are not the zero vector
var denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );
if ( denominator === 0 ) console.error( 'THREE.Vector3: angleTo() does not accept zero vectors.' );
if ( denominator === 0 ) console.error( 'THREE.Vector3: angleTo() can\'t handle zero length vectors.' );
var theta = this.dot( v ) / denominator;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册