25 #ifndef PXR_BASE_TS_MATH_UTILS_H
26 #define PXR_BASE_TS_MATH_UTILS_H
48 deriv[2] = 3. * poly[3];
49 deriv[1] = 2. * poly[2];
68 return u * (u * c[2] + c[1]) + c[0];
76 return u * (u * (u * c[3] + c[2]) + c[1]) + c[0];
83 return u * (u * 3.0 * c[3] + 2.0 * c[2]) + c[1];
bool Ts_SolveQuadratic(const double poly[3], double *root0, double *root1)
GT_API const UT_StringHolder time
void Ts_CubicDerivative(const T poly[4], double deriv[3])
T Ts_EvalCubic(const T c[4], double u)
T Ts_EvalCubicDerivative(const T c[4], double u)
T Ts_EvalQuadratic(const T c[3], double u)
TS_API double Ts_SolveCubic(const TsTime c[4], TsTime time)
PXR_NAMESPACE_OPEN_SCOPE typedef double TsTime
The time type used by Ts.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
double Ts_SolveCubicInInterval(const TsTime poly[4], const TsTime polyDeriv[3], TsTime y, const GfInterval &bounds)