77 return v[0] * (1-pos[0]) + v[1] * pos[0];
84 a[3] = v[3] + v[0] - v[1] - v[2];
85 return a[0] + a[1]*pos[0] + a[2]*pos[1] + a[3]*pos[0]*pos[1];
89 const int lowerN = N-1;
91 float* lowerv =
new float [nlowerpts];
92 const float lastpos = pos[lowerN];
93 for (
od_int64 idx=0; idx<nlowerpts; idx++ )
95 const float v0 = v[idx];
96 const float v1 = v[idx+nlowerpts];
97 lowerv[idx] = (1-lastpos) * v0 + lastpos * v1;
99 const float res =
linearRegND( lowerN, lowerv, pos );
Definition: interpol1d.h:38
#define od_int64
Definition: plftypes.h:36
T linearRegND(int N, const T *v, const T *pos)
Definition: interpolnd.h:72
iT IntPowerOf(iT i, iPOW p)
Definition: math2.h:122