ph-math/src/main/java/com/helger/numbercruncher/mathutils/TrapezoidalIntegrator.java
private float _areaOf (final float x1, final float h)
  {
    final float x2 = x1 + h; // right bound of the region
    final float y1 = m_aIntegrand.at (x1); // value at left bound
    final float y2 = m_aIntegrand.at (x2); // value at right bound
    final float area = h * (y1 + y2) / 2; // area of the region

    return area;
  }
private float _areaOf (final float x1, final float h)
  {
    final float x2 = x1 + h; // right bound of the region
    final float y1 = m_aIntegrand.at (x1); // value at left bound
    final float y2 = m_aIntegrand.at (x2); // value at right bound
    final float area = h * (y1 + y2) / 2; // area of the region

    return area;
  }
private float _areaOf ( final float x1 , final float h ) { final float x2 = x1 + h ; // right bound of the region final float y1 = m_aIntegrand . at ( x1 ) ; // value at left bound final float y2 = m_aIntegrand . at ( x2 ) ; // value at right bound final float area = h * ( y1 + y2 ) / 2 ; // area of the region return area ; }
Compute the area of the ith trapezoidal region.

@param x1
the left bound of the region
@param h
the interval width
@return the area of the region
Compute the area of the ith trapezoidal region .