Skip to content

Commit

Permalink
remove assertions that are now incorrect, #284
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jul 16, 2024
1 parent cf86a21 commit be7721d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions js/diffusion/model/DiffusionParticleSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ function updateMassAndSpeed( mass: number, temperature: number, particles: Diffu
assert && assert( mass > 0, `invalid mass: ${mass}` );
assert && assert( temperature >= 0, `invalid temperature: ${temperature}` );
assert && assert( Array.isArray( particles ), `invalid particles: ${particles}` );
assert && assert( !isSettingPhetioStateProperty.value, 'updateMassAndSpeed should not be called while setting state.' );

for ( let i = particles.length - 1; i >= 0; i-- ) {
particles[ i ].setMass( mass );
Expand All @@ -317,7 +316,6 @@ function updateMassAndSpeed( mass: number, temperature: number, particles: Diffu
*/
function updateRadius( radius: number, particles: DiffusionParticle[], bounds: Bounds2, isPlaying: boolean ): void {
assert && assert( radius > 0, `invalid radius: ${radius}` );
assert && assert( !isSettingPhetioStateProperty.value, 'updateRadius should not be called while setting state.' );

for ( let i = particles.length - 1; i >= 0; i-- ) {

Expand Down

0 comments on commit be7721d

Please sign in to comment.