Changeset 5090 for trunk/psLib/src/math/psSpline.c
- Timestamp:
- Sep 21, 2005, 4:47:16 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psSpline.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psSpline.c
r5072 r5090 7 7 * splines. 8 8 * 9 * @version $Revision: 1.12 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-09-2 0 02:43:53$9 * @version $Revision: 1.127 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-09-22 02:47:16 $ 11 11 * 12 12 * … … 383 383 // If these are linear splines, which means their polynomials will have 384 384 // two coefficients, then we do the simple calculation. 385 if ( 2 == (spline->spline[0])->n) {385 if (1 == (spline->spline[0])->COOL_1D_n) { 386 386 for (i=0;i<spline->n;i++) { 387 387 slope = (y32->data.F32[i+1] - y32->data.F32[i]) / … … 402 402 403 403 // Check if these are cubic splines (n==4). If not, psError. 404 if ( 4 != (spline->spline[0])->n) {404 if (3 != (spline->spline[0])->COOL_1D_n) { 405 405 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 406 406 "Don't know how to generate %u-order splines.", 407 (spline->spline[0])-> n-1);407 (spline->spline[0])->COOL_1D_n); 408 408 return(NULL); 409 409 } … … 745 745 tmpSpline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *)); 746 746 for (unsigned int i=0;i<numSplines;i++) { 747 (tmpSpline->spline)[i] = psPolynomial1DAlloc(order +1, PS_POLYNOMIAL_ORD);747 (tmpSpline->spline)[i] = psPolynomial1DAlloc(order, PS_POLYNOMIAL_ORD); 748 748 } 749 749 … … 809 809 tmpSpline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *)); 810 810 for (unsigned int i=0;i<numSplines;i++) { 811 (tmpSpline->spline)[i] = psPolynomial1DAlloc(order +1, PS_POLYNOMIAL_ORD);811 (tmpSpline->spline)[i] = psPolynomial1DAlloc(order, PS_POLYNOMIAL_ORD); 812 812 } 813 813
Note:
See TracChangeset
for help on using the changeset viewer.
