external/blend2d/src/blend2d/blmath.cpp
// Computes the next k polynomials using scalars computed in calcsc.
Computes the next k polynomials using scalars computed in calcsc.
Computes the next k polynomials using scalars computed in calcsc .
void BLJenkinsTraubSolver::nextk(int* type) {
  double x;
  int i;
  if (*type == 3) {
    k[0] = 0.0;
    k[1] = 0.0;
    for (i = 2; i < n; i++)
      k[i] = qk[i-2];
  }
  else {
    x = a;
    if (*type == 1) x = b;
    if (blAbs(a1) <= blAbs(x) * 10.0 * JT_ETA) {
      k[0] = 0.0;
      k[1] = -a7 * qp[0];
      for (i = 2; i < n; i++)
        k[i] = a3 * qk[i-2] - a7 * qp[i-1];
    }
    else {
      a7 /= a1;
      a3 /= a1;
      k[0] = qp[0];
      k[1] = qp[1] - a7*qp[0];
      for (i = 2; i < n; i++)
        k[i] = a3 * qk[i-2] - a7 * qp[i-1] + qp[i];
    }
  }
}
void BLJenkinsTraubSolver :: nextk ( int * type ) { double x ; int i ; if ( * type == 3 ) { k [ 0 ] = 0.0 ; k [ 1 ] = 0.0 ; for ( i = 2 ; i < n ; i ++ ) k [ i ] = qk [ i - 2 ] ; } else { x = a ; if ( * type == 1 ) x = b ; if ( blAbs ( a1 ) <= blAbs ( x ) * 10.0 * JT_ETA ) { k [ 0 ] = 0.0 ; k [ 1 ] = - a7 * qp [ 0 ] ; for ( i = 2 ; i < n ; i ++ ) k [ i ] = a3 * qk [ i - 2 ] - a7 * qp [ i - 1 ] ; } else { a7 /= a1 ; a3 /= a1 ; k [ 0 ] = qp [ 0 ] ; k [ 1 ] = qp [ 1 ] - a7 * qp [ 0 ] ; for ( i = 2 ; i < n ; i ++ ) k [ i ] = a3 * qk [ i - 2 ] - a7 * qp [ i - 1 ] + qp [ i ] ; } } }
Computes the next k polynomials using scalars computed in calcsc.
Computes the next k polynomials using scalars computed in calcsc .
// Use unscaled form of the recurrence if type is 3. // If a1 is nearly zero then use a special form of the recurrence. // Use scaled form of the recurrence.