Lines Matching full:roots
119 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2])
121 SkASSERT(roots);
124 return valid_unit_divide(-C, B, roots);
126 SkScalar* r = roots;
130 if (R < 0 || SkScalarIsNaN(R)) { // complex roots
149 if (r - roots == 2)
151 if (roots[0] > roots[1])
152 SkTSwap<SkScalar>(roots[0], roots[1]);
153 else if (roots[0] == roots[1]) // nearly-equal?
156 return (int)(r - roots);
163 static int Sk64FindFixedQuadRoots(const Sk64& A, const Sk64& B, const Sk64& C, SkFixed roots[2])
172 return SkFindUnitQuadRoots(A.getShiftRight(shift), B.getShiftRight(shift), C.getShiftRight(shift), roots);
579 valid_unit_divide in SkChopCubicAt(... tValues[], int roots). The reason is
599 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar tValues[], int roots)
603 for (int i = 0; i < roots - 1; i++)
614 if (roots == 0) // nothing to chop
621 for (int i = 0; i < roots; i++)
624 if (i == roots - 1)
682 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY,
685 SkChopCubicAt(src, dst, tValues, roots);
686 if (dst && roots > 0) {
689 if (roots == 2) {
693 return roots;
698 int roots = SkFindCubicExtrema(src[0].fX, src[1].fX, src[2].fX,
701 SkChopCubicAt(src, dst, tValues, roots);
702 if (dst && roots > 0) {
705 if (roots == 2) {
709 return roots;
823 /* Solve coeff(t) == 0, returning the number of roots that
859 SkScalar* roots = tValues;
862 if (SkFPLT(R2MinusQ3, 0)) // we have 3 real roots
870 *roots++ = r;
874 *roots++ = r;
878 *roots++ = r;
880 // now sort the roots
881 bubble_sort(tValues, (int)(roots - tValues));
895 *roots++ = r;
898 return (int)(roots - tValues);
1088 SkScalar roots[2];
1089 int count = SkFindUnitQuadRoots(A, B, C, roots);
1092 return count == 1 ? roots[0] : 0;
1124 For our purposes, we can ignore the <= 0 roots, but we want to
1125 catch the >= 1 roots (which given our caller, will basically mean