Skip to content

Commit

Permalink
remove Math.abs call, magnitude is always a positive number, #260
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Oct 29, 2019
1 parent ad25a40 commit 073931d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/common/view/RootVectorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ define( require => {

// If the magnitude is effectively 0, center the label on the vector's position.
// See https://github.com/phetsims/vector-addition/issues/260
if ( Math.abs( rootVector.magnitude ) < 1E-10 ) {
if ( rootVector.magnitude < 1E-10 ) {
this.labelNode.center = modelViewTransform.modelToViewDelta( Vector2.ZERO );
return;
}
Expand Down

0 comments on commit 073931d

Please sign in to comment.