// calc tangent at x=a
  public final void compute() {
    if (!(f.isDefined() && P.isDefined() && deriv.isDefined())) {
      tangent.setUndefined();
      return;
    }

    // calc the tangent;
    double a = P.inhomX;
    double fa = f.evaluate(a);
    double slope = deriv.evaluate(a);
    tangent.setCoords(-slope, 1.0, a * slope - fa);

    if (!pointOnFunction) T.setCoords(a, fa, 1.0);
  }