17#ifndef __math_hermite_h__
18#define __math_hermite_h__
39 w[0] = (T (0.5)-t) * (T (2.0) *p2 - p3 - position);
40 w[1] = T (1.0) + (T (1.5) +t) *p3 - (T (2.5) +t) *p2;
41 w[2] = (T (2.0) +T (2.0) *t) *p2 + (T (0.5)-t) *position - (T (1.5) +t) *p3;
42 w[3] = (T (0.5)-t) * (p3 - p2);
51 return (
value (vals[0], vals[1], vals[2], vals[3]));
55 S value (
const S& a,
const S& b,
const S& c,
const S& d)
const {
56 return (w[0]*a + w[1]*b + w[2]*c + w[3]*d);
S value(const S &a, const S &b, const S &c, const S &d) const
Hermite(value_type tension=0.0)
value_type coef(size_t i) const
void set(value_type position)
S value(const S *vals) const