Lines Matching defs:roots
78 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) {
79 SkASSERT(roots);
82 return return_check_zero(valid_unit_divide(-C, B, roots));
85 SkScalar* r = roots;
101 if (r - roots == 2) {
102 if (roots[0] > roots[1]) {
104 swap(roots[0], roots[1]);
105 } else if (roots[0] == roots[1]) { // nearly-equal?
109 return return_check_zero((int)(r - roots));
587 // Finds the root nearest 0.5. Returns 0.5 if the roots are undefined or outside 0..1.
591 // The roots are q/a and c/q. Pick the midtangent closer to T=.5.
686 int roots = SkFindCubicExtrema(src[0].fY, src[1].fY, src[2].fY,
689 SkChopCubicAt(src, dst, tValues, roots);
690 if (dst && roots > 0) {
693 if (roots == 2) {
697 return roots;
702 int roots = SkFindCubicExtrema(src[0].fX, src[1].fX, src[2].fX,
705 SkChopCubicAt(src, dst, tValues, roots);
706 if (dst && roots > 0) {
709 if (roots == 2) {
713 return roots;
812 // from overflow down the road while solving for roots and KLM functionals.
940 /* Solve coeff(t) == 0, returning the number of roots that
944 Eliminates repeated roots (so that all tValues are distinct, and are always
969 if (R2MinusQ3 < 0) { // we have 3 real roots
979 // now sort the roots
1054 SkScalar roots[3];
1055 int rootCount = SkFindCubicMaxCurvature(src, roots);
1060 if (0 < roots[i] && roots[i] < 1) {
1061 tValues[count++] = roots[i];
1117 int roots = SkFindCubicMaxCurvature(src, maxCurvature);
1118 for (int index = 0; index < roots; ++index) {
1140 typedef int (SkDCubic::*InterceptProc)(double intercept, double roots[3]) const;
1145 double roots[3];
1146 int count = (cubic.set(src).*method)(intercept, roots);
1148 SkDCubicPair pair = cubic.chopAt(roots[0]);
1212 int roots = SkFindUnitQuadRoots(coeff[0], coeff[1], coeff[2], tValues);
1213 SkASSERT(0 == roots || 1 == roots);
1215 if (1 == roots) {