This commit adds a new function ´clamp´ to the codebase. The clamp function takes a minimum value, a maximum value, and a value to be clamped, and returns the clamped value. The function is useful for constraining a value to a specific range, such as limiting a user input to a certain range of values. The function has been tested with several test cases to ensure that it works correctly.
This commit adds a new function ´clamp´ to the codebase. The clamp function takes a minimum value, a maximum value, and a value to be clamped, and returns the clamped value. The function is useful for constraining a value to a specific range, such as limiting a user input to a certain range of values. The function has been tested with several test cases to ensure that it works correctly.