You are right -- this used to be more code, but now it is short enough to duplicate it for min and max.