• Home
  • Raw
  • Download

Lines Matching refs:roots

87 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2])  in SkFindUnitQuadRoots()
89 SkASSERT(roots); in SkFindUnitQuadRoots()
92 return valid_unit_divide(-C, B, roots); in SkFindUnitQuadRoots()
94 SkScalar* r = roots; in SkFindUnitQuadRoots()
116 if (r - roots == 2) in SkFindUnitQuadRoots()
118 if (roots[0] > roots[1]) in SkFindUnitQuadRoots()
119 SkTSwap<SkScalar>(roots[0], roots[1]); in SkFindUnitQuadRoots()
120 else if (roots[0] == roots[1]) // nearly-equal? in SkFindUnitQuadRoots()
123 return (int)(r - roots); in SkFindUnitQuadRoots()
130 static int Sk64FindFixedQuadRoots(const Sk64& A, const Sk64& B, const Sk64& C, SkFixed roots[2]) in Sk64FindFixedQuadRoots()
139 …SkFindUnitQuadRoots(A.getShiftRight(shift), B.getShiftRight(shift), C.getShiftRight(shift), roots); in Sk64FindFixedQuadRoots()
531 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar tValues[], int roots) in SkChopCubicAt() argument
535 for (int i = 0; i < roots - 1; i++) in SkChopCubicAt()
546 if (roots == 0) // nothing to chop in SkChopCubicAt()
553 for (int i = 0; i < roots; i++) in SkChopCubicAt()
556 if (i == roots - 1) in SkChopCubicAt()
615 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY, src[3].fY, tValues); in SkChopCubicAtYExtrema() local
617 SkChopCubicAt(src, dst, tValues, roots); in SkChopCubicAtYExtrema()
618 if (dst && roots > 0) in SkChopCubicAtYExtrema()
622 if (roots == 2) in SkChopCubicAtYExtrema()
625 return roots; in SkChopCubicAtYExtrema()
775 SkScalar* roots = tValues; in solve_cubic_polynomial() local
786 *roots++ = r; in solve_cubic_polynomial()
790 *roots++ = r; in solve_cubic_polynomial()
794 *roots++ = r; in solve_cubic_polynomial()
797 bubble_sort(tValues, (int)(roots - tValues)); in solve_cubic_polynomial()
811 *roots++ = r; in solve_cubic_polynomial()
814 return (int)(roots - tValues); in solve_cubic_polynomial()
917 SkScalar roots[2]; in quad_solve() local
918 int count = SkFindUnitQuadRoots(A, B, C, roots); in quad_solve()
921 return count == 1 ? roots[0] : 0; in quad_solve()