# 用CoreGraphics查找二次貝塞爾的最小值/最大值

## 最佳答案

t = (x0 - x1)/(x0 - 2*x1 + x2)


If 0 <= t <= 1, then evaluate your curve at t and store the location as Px. Do the same thing for y:

t = (y0 - y1)/(y0 - 2*y1 + y2)


Again, if 0 <= t <= 1, evaluate your curve at t and store the location as Py. Finally, find the axis-aligned bounding box containing P0, P2, Px (if found) and Py (if found). This bounding box will also tightly bound your 2D quadratic Bezier curve.