code: @Override
      public double membership(double x) {
          if (Double.isNaN(x)) {
              return Double.NaN;
          }
  
          if (Op.isLt(x, vertexA) || Op.isGt(x, vertexD)) {
              return height * 0.0;
          } else if (Op.isLt(x, vertexB)) {
              return height * Math.min(1.0, (x - vertexA) / (vertexB - vertexA));
          } else if (Op.isLE(x, vertexC)) {
              return height * 1.0;
          } else if (Op.isLt(x, vertexD)) {
              return height * (vertexD - x) / (vertexD - vertexC);
          }
          return height * 0.0;
      }
docs: Computes the membership function evaluated at `x`
  
  @param x
  @return `\begin{cases} 0h & \mbox{if $x \not\in[a,d]$}\cr h \times
  \min(1, (x - a) / (b - a)) & \mbox{if $x < b$}\cr 1h & \mbox{if $x \leq
  c$}\cr h (d - x) / (d - c) & \mbox{if $x < d$}\cr 0h & \mbox{otherwise}
  \end{cases}`
  
  where `h` is the height of the Term, `a` is the first vertex of the
  Trapezoid, `b` is the second vertex of the Tr a pezoid, `c` is the
  third vertex of the Trapezoid, `d` is the fourth vertex of the
  Trapezoid