added Math.clamp() method