Added Clamp() function to the lua api.