phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

Tandem number being incremented in trajectory every time new projectile is added, even when no new Trajectory is created #287

Closed matthew-blackman closed 1 year ago

matthew-blackman commented 1 year ago

Example: Fire two projectiles on the same trajectory, then change the launch values and fire another. New trajectory will be named 'trajectory_02' instead of 'trajectory_01'

zepumph commented 1 year ago

I think the gross code is here. Note that we need to create a new Trajectory just to decide if it is equal to the current one (then disposing the newly created one). Can we clean this up so that we can test for equality without creating a whole new Trajectory instance?