75 return v[0] * (1-pos[0]) + v[1] * pos[0];
82 a[3] = v[3] + v[0] - v[1] - v[2];
83 return a[0] + a[1]*pos[0] + a[2]*pos[1] + a[3]*pos[0]*pos[1];
87 const int lowerN = N-1;
89 float* lowerv =
new float [nlowerpts];
90 const float lastpos = pos[lowerN];
91 for (
od_int64 idx=0; idx<nlowerpts; idx++ )
93 const float v0 = v[idx];
94 const float v1 = v[idx+nlowerpts];
95 lowerv[idx] = (1-lastpos) * v0 + lastpos * v1;
97 const float res =
linearRegND( lowerN, lowerv, pos );
Definition: interpol1d.h:36
#define od_int64
Definition: plftypes.h:34
T linearRegND(int N, const T *v, const T *pos)
Definition: interpolnd.h:70
iT IntPowerOf(iT i, iPOW p)
Definition: math2.h:126