// OPTIMIZE? compute t^2, t(1-t), and (1-t)^2 and pass them to another version of derivative at t? _Vector dxdy_at_t(const Cubic& cubic, double t) { _Vector result = { derivativeAtT(&cubic[0].x, t), derivativeAtT(&cubic[0].y, t) }; return result; }
double dy_at_t(const Quadratic& quad, double t) { return derivativeAtT(&quad[0].y, t); }
double dy_at_t(const Cubic& cubic, double t) { return derivativeAtT(&cubic[0].y, t); }
// OPTIMIZE? compute t^2, t(1-t), and (1-t)^2 and pass them to another version of derivative at t? void dxdy_at_t(const Cubic& cubic, double t, _Point& dxdy) { dxdy.x = derivativeAtT(&cubic[0].x, t); dxdy.y = derivativeAtT(&cubic[0].y, t); }