Skip to content

Commit

Permalink
Math.round => Util.roundSymmetric, see phetsims/tasks#275
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jun 23, 2015
1 parent 25553ec commit 1caf3b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/wave-on-a-string/view/control/slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define( function( require ) {
var inherit = require( 'PHET_CORE/inherit' );
var Dimension2 = require( 'DOT/Dimension2' );
var Range = require( 'DOT/Range' );
var Util = require( 'DOT/Util' );
var Property = require( 'AXON/Property' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
Expand Down Expand Up @@ -53,7 +54,7 @@ define( function( require ) {
options = _.extend( {}, defaultOptions, options );
if ( !options.endDrag && options.rounding !== false ) {
options.endDrag = function() {
options.property.set( Math.round( options.property.get() * Math.pow( 10, options.rounding ) ) / Math.pow( 10, options.rounding ) );
options.property.set( Util.roundSymmetric( options.property.get() * Math.pow( 10, options.rounding ) ) / Math.pow( 10, options.rounding ) );
};
}

Expand Down

0 comments on commit 1caf3b1

Please sign in to comment.