:: StoryTitle
Limiting the range of a number in SugarCube
:: Start
Initialise the numeric variable to a value with the range you want.
eg. between ''1'' and ''10'' inclusive.
(note: You don't need to use the //Math.clamp()// funtion at this point.)\
<>
''Current value'': $valueToClamp
Increase the number to a value that is ''within'' the desired range.
eg. Add 1 to the current value.\
<>
''New value'': $valueToClamp
Try to increase the number to a value that is ''outside'' the desired range.
eg. Add 100 to the current value.\
<>
''New value'': $valueToClamp
Decrease the number to a value that is ''within'' the desired range.
eg. Minus 5 from the current value.\
<>
''New value'': $valueToClamp
Try to decrease the number to a value that is ''outside'' the desired range.
eg. Minus 100 from the current value.\
<>
''New value'': $valueToClamp