• Home
  • Raw
  • Download

Lines Matching full:roots

71 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) {  in SkFindUnitQuadRoots()
72 SkASSERT(roots); in SkFindUnitQuadRoots()
75 return valid_unit_divide(-C, B, roots); in SkFindUnitQuadRoots()
78 SkScalar* r = roots; in SkFindUnitQuadRoots()
81 if (R < 0 || !SkScalarIsFinite(R)) { // complex roots in SkFindUnitQuadRoots()
95 if (r - roots == 2) { in SkFindUnitQuadRoots()
96 if (roots[0] > roots[1]) in SkFindUnitQuadRoots()
97 SkTSwap<SkScalar>(roots[0], roots[1]); in SkFindUnitQuadRoots()
98 else if (roots[0] == roots[1]) // nearly-equal? in SkFindUnitQuadRoots()
101 return (int)(r - roots); in SkFindUnitQuadRoots()
421 valid_unit_divide in SkChopCubicAt(... tValues[], int roots). The reason is
442 const SkScalar tValues[], int roots) { in SkChopCubicAt() argument
445 for (int i = 0; i < roots - 1; i++) in SkChopCubicAt()
455 if (roots == 0) { // nothing to chop in SkChopCubicAt()
461 for (int i = 0; i < roots; i++) { in SkChopCubicAt()
463 if (i == roots - 1) { in SkChopCubicAt()
502 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY, in SkChopCubicAtYExtrema() local
505 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtYExtrema()
506 if (dst && roots > 0) { in SkChopCubicAtYExtrema()
509 if (roots == 2) { in SkChopCubicAtYExtrema()
513 return roots; in SkChopCubicAtYExtrema()
518 int roots = SkFindCubicExtrema(src[0].fX, src[1].fX, src[2].fX, in SkChopCubicAtXExtrema() local
521 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtXExtrema()
522 if (dst && roots > 0) { in SkChopCubicAtXExtrema()
525 if (roots == 2) { in SkChopCubicAtXExtrema()
529 return roots; in SkChopCubicAtXExtrema()
607 // Calc coefficients of I(s,t) where roots of I are inflection points of curve
713 /* Solve coeff(t) == 0, returning the number of roots that
717 Eliminates repeated roots (so that all tValues are distinct, and are always
742 SkScalar* roots = tValues; in solve_cubic_poly() local
745 if (R2MinusQ3 < 0) { // we have 3 real roots in solve_cubic_poly()
751 *roots++ = r; in solve_cubic_poly()
755 *roots++ = r; in solve_cubic_poly()
759 *roots++ = r; in solve_cubic_poly()
763 // now sort the roots in solve_cubic_poly()
764 int count = (int)(roots - tValues); in solve_cubic_poly()
768 roots = tValues + count; // so we compute the proper count below in solve_cubic_poly()
780 *roots++ = r; in solve_cubic_poly()
784 return (int)(roots - tValues); in solve_cubic_poly()
868 typedef int (SkDCubic::*InterceptProc)(double intercept, double roots[3]) const;
873 double roots[3]; in cubic_dchop_at_intercept() local
874 int count = (cubic.set(src).*method)(intercept, roots); in cubic_dchop_at_intercept()
876 SkDCubicPair pair = cubic.chopAt(roots[0]); in cubic_dchop_at_intercept()
940 int roots = SkFindUnitQuadRoots(coeff[0], coeff[1], coeff[2], tValues); in conic_find_extrema() local
941 SkASSERT(0 == roots || 1 == roots); in conic_find_extrema()
943 if (1 == roots) { in conic_find_extrema()