76 return v[0] * (1-pos[0]) + v[1] * pos[0];
83 a[3] = v[3] + v[0] - v[1] - v[2];
84 return a[0] + a[1]*pos[0] + a[2]*pos[1] + a[3]*pos[0]*pos[1];
88 const int lowerN = N-1;
90 float* lowerv =
new float [nlowerpts];
91 const float lastpos = pos[lowerN];
92 for (
od_int64 idx=0; idx<nlowerpts; idx++ )
94 const float v0 = v[idx];
95 const float v1 = v[idx+nlowerpts];
96 lowerv[idx] = (1-lastpos) * v0 + lastpos * v1;
98 const float res =
linearRegND( lowerN, lowerv, pos );