roundToInterval¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/dot/blob/main/js/util/roundToInterval.ts for the most up-to-date information.
Overview¶
Rounds a value to a multiple of a specified interval. Examples: roundToInterval( 0.567, 0.01 ) -> 0.57 roundToInterval( 0.567, 0.02 ) -> 0.56 roundToInterval( 5.67, 0.5 ) -> 5.5
@author Chris Malley (cmalley@pixelzoom.com)
Source Code¶
See the source for roundToInterval.ts in the dot repository.