Changed parameters for the sequence-based versions of clamp from being passed by vaue to being passed by const &. Thanks to Martin Moene for the suggestion.