Lines Matching refs:roots

65 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) {  in SkFindUnitQuadRoots()
66 SkASSERT(roots); in SkFindUnitQuadRoots()
69 return valid_unit_divide(-C, B, roots); in SkFindUnitQuadRoots()
72 SkScalar* r = roots; in SkFindUnitQuadRoots()
89 if (r - roots == 2) { in SkFindUnitQuadRoots()
90 if (roots[0] > roots[1]) in SkFindUnitQuadRoots()
91 SkTSwap<SkScalar>(roots[0], roots[1]); in SkFindUnitQuadRoots()
92 else if (roots[0] == roots[1]) // nearly-equal? in SkFindUnitQuadRoots()
95 return (int)(r - roots); in SkFindUnitQuadRoots()
405 const SkScalar tValues[], int roots) { in SkChopCubicAt() argument
408 for (int i = 0; i < roots - 1; i++) in SkChopCubicAt()
418 if (roots == 0) { // nothing to chop in SkChopCubicAt()
424 for (int i = 0; i < roots; i++) { in SkChopCubicAt()
426 if (i == roots - 1) { in SkChopCubicAt()
465 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY, in SkChopCubicAtYExtrema() local
468 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtYExtrema()
469 if (dst && roots > 0) { in SkChopCubicAtYExtrema()
472 if (roots == 2) { in SkChopCubicAtYExtrema()
476 return roots; in SkChopCubicAtYExtrema()
481 int roots = SkFindCubicExtrema(src[0].fX, src[1].fX, src[2].fX, in SkChopCubicAtXExtrema() local
484 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtXExtrema()
485 if (dst && roots > 0) { in SkChopCubicAtXExtrema()
488 if (roots == 2) { in SkChopCubicAtXExtrema()
492 return roots; in SkChopCubicAtXExtrema()
706 SkScalar* roots = tValues; in solve_cubic_poly() local
716 *roots++ = r; in solve_cubic_poly()
720 *roots++ = r; in solve_cubic_poly()
724 *roots++ = r; in solve_cubic_poly()
729 int count = (int)(roots - tValues); in solve_cubic_poly()
733 roots = tValues + count; // so we compute the proper count below in solve_cubic_poly()
745 *roots++ = r; in solve_cubic_poly()
749 return (int)(roots - tValues); in solve_cubic_poly()
833 typedef int (SkDCubic::*InterceptProc)(double intercept, double roots[3]) const;
838 double roots[3]; in cubic_dchop_at_intercept() local
839 int count = (cubic.set(src).*method)(intercept, roots); in cubic_dchop_at_intercept()
841 SkDCubicPair pair = cubic.chopAt(roots[0]); in cubic_dchop_at_intercept()
905 int roots = SkFindUnitQuadRoots(coeff[0], coeff[1], coeff[2], tValues); in conic_find_extrema() local
906 SkASSERT(0 == roots || 1 == roots); in conic_find_extrema()
908 if (1 == roots) { in conic_find_extrema()