IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2008, 3:12:40 PM (18 years ago)
Author:
Paul Price
Message:

psPolynomialMDEval was in a horrible half-state of implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psPolynomialMD.c

    r16812 r16838  
    217217
    218218    double sum = coeff[0];              // Sum of all polynomials
    219     for (int i = 0, index = 0; i < poly->dim; i++) {
     219    for (int i = 0, index = 1; i < poly->dim; i++) {
    220220        int order = orders->data.U8[i]; // Order of polynomial
    221221        float coord = coords->data.F32[i]; // Coordinate of interest
    222         float value = 1.0 + coeff[index++]; // Value of the polynomial term
     222        float value = coord; // Value of the polynomial stage
     223        sum += coeff[index++] * value;
    223224        for (int j = 2; j <= order; j++, index++) {
    224225            value *= coord;
Note: See TracChangeset for help on using the changeset viewer.