phetsims/scenery-phet

assertion commented out in ArrowNode setTipAndTail

Closed this issue · 3 comments

Discovered in vector-addition while determining how to handle zero-magnitude vectors uniformly in ArrowNode and LineArrowNode. High priority.

In 42eaa4e, @samreid commented out this assertion in ArrowNode setTailAndTip:

// assert && assert( !(tailX === tipX && tailY === tipY), 'arrow should have different tail and tip' );

@samreid what is your reason for commenting this out? Please either (a) remove the assertion entirely and document the expected behavior when tip === tail, or (b) restore the assertion.

That change was apparently made while working on Masses and Springs, probably related to phetsims/kite#69.

I removed the assertion and updated the documentation to indicate no arrow is shown when tail===tip.

👍 closing