phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

PeriodTrace pendulum angle link computes with null #47

Closed jonathanolson closed 9 years ago

jonathanolson commented 9 years ago

Because link() is called on the angle property, oldAngle is null the first time it is triggered. Please lazyLink if that is desired, or explicitly handle the null case (instead of adding and multiplying with null).

andrey-zelenkov commented 9 years ago

Change link() to lazyLink() call for angleProperty. Reassign to @jonathanolson for verification.

jonathanolson commented 9 years ago

Looks good, thanks!