src/main/java/workshop5/Controller/IntegrationController.java
public IntegrationDistribution calculateIntegrationFunction(IntegrationDistribution t) {
        double p1 = IntegrationModel.calculateNumericalIntegrationP(t);
        t.setNumSeg(t.getNumSeg() * 2);
        t.setWidthSegment(t.getxValue() / t.getNumSeg());
        double p2 = IntegrationModel.calculateNumericalIntegrationP(t);
        if (p1 - p2 < Math.E) {
            t.setP(p2);
            return t;

        } else {
            return calculateIntegrationFunction(t);
        }

    }
/**
     * Method that calculates the integration
     *
     * @param t IntegrationDistribution t
     * @return IntegrationDistribution t
     */
Method that calculates the integration
@param t IntegrationDistribution t
@return IntegrationDistribution t
Method that calculates the integration @param t IntegrationDistribution t @return IntegrationDistribution t
public IntegrationDistribution calculateIntegrationFunction(IntegrationDistribution t) {
        double p1 = IntegrationModel.calculateNumericalIntegrationP(t);
        t.setNumSeg(t.getNumSeg() * 2);
        t.setWidthSegment(t.getxValue() / t.getNumSeg());
        double p2 = IntegrationModel.calculateNumericalIntegrationP(t);
        if (p1 - p2 < Math.E) {
            t.setP(p2);
            return t;
        } else {
            return calculateIntegrationFunction(t);
        }
    }
public IntegrationDistribution calculateIntegrationFunction ( IntegrationDistribution t ) { double p1 = IntegrationModel . calculateNumericalIntegrationP ( t ) ; t . setNumSeg ( t . getNumSeg ( ) * 2 ) ; t . setWidthSegment ( t . getxValue ( ) / t . getNumSeg ( ) ) ; double p2 = IntegrationModel . calculateNumericalIntegrationP ( t ) ; if ( p1 - p2 < Math . E ) { t . setP ( p2 ) ; return t ; } else { return calculateIntegrationFunction ( t ) ; } }
Method that calculates the integration
 @param t IntegrationDistribution t
 @return IntegrationDistribution t
Method that calculates the integration @param t IntegrationDistribution t @return IntegrationDistribution t