t should be between 0 and 1