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 TRange::clip() method #2480

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Feb 6, 2022

Clips a value to within the given range:

TRange<int> range(10, 20);
int val1 = range.clip(5); // 10
int val2 = range.clip(25); // 20
int val3 = range.clip(15); // 15

@slaff slaff added this to the 4.6.0 milestone Feb 7, 2022
@slaff slaff merged commit 436dcc8 into SmingHub:develop Feb 8, 2022
@mikee47 mikee47 deleted the feature/range-clip branch February 10, 2022 21:09
@slaff slaff mentioned this pull request Feb 25, 2022
5 tasks
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.

2 participants