22 return (
float)
roots[0];
26 SkPoint array[] = { {0, 0}, p1, p2, {1,1} };
27 SkCubicCoeff coeff(array);
29 float t =
accurate_t(coeff.fA[0], coeff.fB[0], coeff.fC[0], coeff.fD[0] -
x);
31 float y = coeff.eval(t)[1];
41 const SkScalar MAX_SOLVER_ERR = 0.008f;
65 0, 1, 0.5f, 0.0000001f, 0.999999f,
static void exercise_cubicmap(SkPoint p1, SkPoint p2, skiatest::Reporter *reporter)
static float accurate_t(float A, float B, float C, float D)
static bool nearly_le(SkScalar a, SkScalar b)
static float accurate_solve(SkPoint p1, SkPoint p2, SkScalar x)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
#define REPORTER_ASSERT(r, cond,...)
float computeYFromX(float x) const
static int RootsValidT(double A, double B, double C, double D, double solution[3])
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx