18{{{2.6250000819563866, 2.3750000223517418}, {2.833333432674408, 2.3333333432674408}, {3.1111112236976624, 2.3333333134651184}, {3.4074075222015381, 2.3333332538604736}}},
27 cubic.debugSet(c.
fPts);
29 cubic.convexHull(order);
42 double expectedA,
double expectedB,
43 double expectedC,
double expectedD) {
46 "Invalid test case. Need 4 points (start, control, control, end)");
48 const double* input = &curveInputs[0].fX;
50 input = &curveInputs[0].fY;
63 {{1, 2}, {-3, 4}, {5, -6}, {7, 8}},
false,
67 {{1, 2}, {-3, 4}, {5, -6}, {7, 8}},
true,
static const size_t hullTests_count
static bool nearly_equal(double expected, double actual)
static const CubicPts hullTests[]
static void testConvertToPolynomial(skiatest::Reporter *reporter, const std::string &name, SkSpan< const SkDPoint > curveInputs, bool yValues, double expectedA, double expectedB, double expectedC, double expectedD)
bool sk_double_nearly_zero(double a)
bool sk_doubles_nearly_equal_ulps(double a, double b, uint8_t maxUlpsDiff=16)
#define DEF_TEST(name, reporter)
#define REPORTER_ASSERT(r, cond,...)
constexpr size_t size() const
SkDPoint fPts[kPointCount]
static void Coefficients(const double *cubic, double *A, double *B, double *C, double *D)