i didn't know clamp or lerp till construct
but yeah clamp is like this:
clamp(input,lowest,highest)
it just gives you back the 'input' number, unless it's out of the range of highest and lowest. if it is, then it just forces it into that range
clamp(5,0,10)==5 (not lower than 0 or higher than 10)
clamp(3,0,10)==3 (not lower than 0 or higher than 10)
clamp(-3,0,10)==0 (too low, force it into range)
clamp(1000,0,10)==10 (too high, force it into range)
lerp(a,b,t)
lerp gives you a number between a and b
and it uses t to determine how far along it is between a and b
think of t like a percentage, but with a decimal in front of it
t==0 is like 0% (t==0)
t==1 is like 100% (t==1.00)
t==0.54 is like 54%
t==0.3 is like 30%
lerp(a,b,t)
so if t is at 0 you get back 'a'
if t is at 1 you get back 'b'
and if t is anything in between 0 and 1, it's that far along the line between a and b
lerp(0,4,0)==0
lerp(0,4,0.25)==1
lerp(0,4,0.50)==2
lerp(0,4,0.75)==3
lerp(0,4,1)==4
I made a short tutorial about lerp that helps some people if the explanation didn't work, it's more interactive and visual:
http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=8735