Lines Matching refs:roots
74 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) { in SkFindUnitQuadRoots()
75 SkASSERT(roots); in SkFindUnitQuadRoots()
78 return return_check_zero(valid_unit_divide(-C, B, roots)); in SkFindUnitQuadRoots()
81 SkScalar* r = roots; in SkFindUnitQuadRoots()
97 if (r - roots == 2) { in SkFindUnitQuadRoots()
98 if (roots[0] > roots[1]) { in SkFindUnitQuadRoots()
100 swap(roots[0], roots[1]); in SkFindUnitQuadRoots()
101 } else if (roots[0] == roots[1]) { // nearly-equal? in SkFindUnitQuadRoots()
105 return return_check_zero((int)(r - roots)); in SkFindUnitQuadRoots()
427 const SkScalar tValues[], int roots) { in SkChopCubicAt() argument
430 for (int i = 0; i < roots - 1; i++) in SkChopCubicAt()
440 if (roots == 0) { // nothing to chop in SkChopCubicAt()
446 for (int i = 0; i < roots; i++) { in SkChopCubicAt()
448 if (i == roots - 1) { in SkChopCubicAt()
487 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY, in SkChopCubicAtYExtrema() local
490 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtYExtrema()
491 if (dst && roots > 0) { in SkChopCubicAtYExtrema()
494 if (roots == 2) { in SkChopCubicAtYExtrema()
498 return roots; in SkChopCubicAtYExtrema()
503 int roots = SkFindCubicExtrema(src[0].fX, src[1].fX, src[2].fX, in SkChopCubicAtXExtrema() local
506 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtXExtrema()
507 if (dst && roots > 0) { in SkChopCubicAtXExtrema()
510 if (roots == 2) { in SkChopCubicAtXExtrema()
514 return roots; in SkChopCubicAtXExtrema()
855 SkScalar roots[3]; in SkChopCubicAtMaxCurvature() local
856 int rootCount = SkFindCubicMaxCurvature(src, roots); in SkChopCubicAtMaxCurvature()
861 if (0 < roots[i] && roots[i] < 1) { in SkChopCubicAtMaxCurvature()
862 tValues[count++] = roots[i]; in SkChopCubicAtMaxCurvature()
918 int roots = SkFindCubicMaxCurvature(src, maxCurvature); in SkFindCubicCusp() local
919 for (int index = 0; index < roots; ++index) { in SkFindCubicCusp()
941 typedef int (SkDCubic::*InterceptProc)(double intercept, double roots[3]) const;
946 double roots[3]; in cubic_dchop_at_intercept() local
947 int count = (cubic.set(src).*method)(intercept, roots); in cubic_dchop_at_intercept()
949 SkDCubicPair pair = cubic.chopAt(roots[0]); in cubic_dchop_at_intercept()
1013 int roots = SkFindUnitQuadRoots(coeff[0], coeff[1], coeff[2], tValues); in conic_find_extrema() local
1014 SkASSERT(0 == roots || 1 == roots); in conic_find_extrema()
1016 if (1 == roots) { in conic_find_extrema()