Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public BoundedInteger(int lowerValue, int upperValue, int initialValue)
- {
- if (lowerValue >= upperValue)
- {
- upperBound=lowerValue;
- lowerBound=upperValue;
- }else{
- lowerBound=lowerValue;
- upperBound=upperValue;
- }
- if ((initialValue >= lowerValue) && (initialValue <= upperValue))
- {
- value=initialValue;
- }else{
- value=lowerBound;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement