clamp¶
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/clamp.ts for the most up-to-date information.
Overview¶
Returns the original value if it is inclusively within the [max,min] range. If it's below the range, min is returned, and if it's above the range, max is returned.
@author Jonathan Olson <jonathan.olson@colorado.edu>