23.6 Extreme Values and Real-World Uses
If x can only run over part of the line, check whether the axis falls inside that interval before deciding between the endpoints and the vertex.