11 for (
int i=1; i<=n; i++)
13 powers[i] = powers[i-1]*x;
70 coeff_[1] = (pos2 - pos1) / duration;
98 coeff_[2] = (-3.0*pos1 + 3.0*pos2 - 2.0*vel1*T[1] - vel2*T[1]) / T[2];
99 coeff_[3] = (2.0*pos1 - 2.0*pos2 + vel1*T[1] + vel2*T[1]) / T[3];
126 coeff_[3] = (-20.0*pos1 + 20.0*pos2 - 3.0*acc1*T[2] + acc2*T[2] -
127 12.0*vel1*T[1] - 8.0*vel2*T[1]) / (2.0*T[3]);
128 coeff_[4] = (30.0*pos1 - 30.0*pos2 + 3.0*acc1*T[2] - 2.0*acc2*T[2] +
129 16.0*vel1*T[1] + 14.0*vel2*T[1]) / (2.0*T[4]);
130 coeff_[5] = (-12.0*pos1 + 12.0*pos2 - acc1*T[2] + acc2*T[2] -
131 6.0*vel1*T[1] - 6.0*vel2*T[1]) / (2.0*T[5]);
148 position = t[0]*
coeff_[0] +
163 velocity = t[0]*
coeff_[1] +
177 acceleration = 2.0*t[0]*
coeff_[2] +