Skip to content

Commit

Permalink
Document about roundoff error, see #484
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Apr 15, 2020
1 parent 8ca5cd7 commit 0b93187
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/common/view/WaveInterferenceSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class WaveInterferenceSlider extends HSlider {

timer.setTimeout( () => {

// Also account for roundoff error, since 0.99999 seems like close enough to the end of the input.
if ( Math.abs( value - property.value ) <= 1E-6 ) {
sliderBoundaryClickSoundClip.play();
}
Expand Down

0 comments on commit 0b93187

Please sign in to comment.