Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clamp function #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add clamp function #276

wants to merge 1 commit into from

Conversation

mck
Copy link

@mck mck commented Feb 24, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant