Initialise the numeric variable to a value with the range you want.<br>
eg. between <b>1</b> and <b>10</b> inclusive.<br>
(note: You don't need to use the <i>Math.clamp()</i> funtion at this point.)<br>
<% s.valueToClamp = 5 %>
<b>Current value</b>: <%= s.valueToClamp %>
Increase the number to a value that is <b>within</b> the desired range.<br>
eg. Add 1 to the current value.
<% s.valueToClamp = Math.clamp(s.valueToClamp + 1, 1, 10) %>
<b>New value</b>: <%= s.valueToClamp %>
Try to increase the number to a value that is <b>outside</b> the desired range.<br>
eg. Add 100 to the current value.
<% s.valueToClamp = Math.clamp(s.valueToClamp + 100, 1, 10) %>
<b>New value</b>: <%= s.valueToClamp %>
Decrease the number to a value that is <b>within</b> the desired range.<br>
eg. Minus 5 from the current value.
<% s.valueToClamp = Math.clamp(s.valueToClamp - 5, 1, 10) %>
<b>New value</b>: <%= s.valueToClamp %>
Try to decrease the number to a value that is <b>outside</b> the desired range.<br>
eg. Minus 100 from the current value.
<% s.valueToClamp = Math.clamp(s.valueToClamp - 100, 1, 10) %>
<b>New value</b>: <%= s.valueToClamp %>