moduloBetweenDown¶
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/moduloBetweenDown.ts for the most up-to-date information.
Overview¶
Returns a number in the range \(n\in[\mathrm{min},\mathrm{max})\) with the same equivalence class as the input value mod (max-min), i.e. for a value \(m\), \(m\equiv n\ (\mathrm{mod}\ \mathrm{max}-\mathrm{min})\).
The 'down' indicates that if the value is equal to min or max, the max is returned.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Source Code¶
See the source for moduloBetweenDown.ts in the dot repository.