// Returns the normal vector at t QLineF KCubicBezier::normalVectorAt(qreal t) const { const QPointF point = pointAt(t); const QPointF delta = deltaAt(t); return QLineF(point, point + delta).normalVector(); }
// Returns the slope at t (dy / dx) qreal KCubicBezier::slopeAt(qreal t) const { const QPointF delta = deltaAt(t); return qFuzzyIsNull(delta.x()) ? (delta.y() < 0 ? -1 : 1) : delta.y() / delta.x(); }
Real FdmHestonSolver::meanVarianceDeltaAt(Real s, Real v) const { calculate(); const Real x = std::log(s); const Real alpha = process_->rho()*process_->sigma()/s; return deltaAt(s, v) + alpha*interpolation_->derivativeY(x, v); }