Skip to content

Commit

Permalink
prefer Utils.toFixed when possible, phetsims/chipper#737
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 26, 2021
1 parent 97ac7af commit 13fb656
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/soundManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import BooleanProperty from '../../axon/js/BooleanProperty.js';
import Property from '../../axon/js/Property.js';
import Utils from '../../dot/js/Utils.js';
import merge from '../../phet-core/js/merge.js';
import Display from '../../scenery/js/display/Display.js';
import DisplayedProperty from '../../scenery/js/util/DisplayedProperty.js';
Expand Down Expand Up @@ -602,7 +603,7 @@ class SoundManager extends PhetioObject {
function logGain() {
const now = Date.now();
const timeInMilliseconds = now - startTime;
console.log( `Time (ms): ${timeInMilliseconds.toFixed( 2 )}, Gain Value: ${gainNode.gain.value}` );
console.log( `Time (ms): ${Utils.toFixed( timeInMilliseconds, 2 )}, Gain Value: ${gainNode.gain.value}` );
if ( now - startTime < ( duration * 1000 ) ) {
window.requestAnimationFrame( logGain );
}
Expand Down

0 comments on commit 13fb656

Please sign in to comment.