Lines Matching defs:Cubic
89 } Cubic[4], Quadratic[3];
91 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) {
92 float dx10 = cubic[1].x - cubic[0].x;
93 float dx23 = cubic[2].x - cubic[3].x;
94 float midX = cubic[0].x + dx10 * 3 / 2;
95 //NOTE: !approximately_equal(midX - cubic[3].x, dx23 * 3 / 2)
97 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) {
100 float dy10 = cubic[1].y - cubic[0].y;
101 float dy23 = cubic[2].y - cubic[3].y;
102 float midY = cubic[0].y + dy10 * 3 / 2;
103 if (!approximately_equal(midY, (dy23 * 3 / 2) + cubic[3].y)) {
106 reduction[0] = cubic[0];
109 reduction[2] = cubic[3];
119 Cubic cubic = { { prevPt.x, prevPt.y },
124 if (check_quadratic(cubic, quadratic)) {