src/main/java/workshop5/Model/IntegrationModel.java
public static double factorial(double number) {

        if (number == ZERO) {
            return 1.0;
        } else if (number == MIDDLE) {
            return number * Math.sqrt(Math.PI);
        } else {
            return number * factorial(number - 1);
        }

    }
/**
     * Method to calculate the factorial function for doubles
     *
     * @param number
     * @return factorial result
     */
Method to calculate the factorial function for doubles
@param number
@return factorial result
Method to calculate the factorial function for doubles @param number @return factorial result
public static double factorial(double number) {
        if (number == ZERO) {
            return 1.0;
        } else if (number == MIDDLE) {
            return number * Math.sqrt(Math.PI);
        } else {
            return number * factorial(number - 1);
        }
    }
public static double factorial ( double number ) { if ( number == ZERO ) { return 1.0 ; } else if ( number == MIDDLE ) { return number * Math . sqrt ( Math . PI ) ; } else { return number * factorial ( number - 1 ) ; } }
Method to calculate the factorial function for doubles
 @param number
 @return factorial result
Method to calculate the factorial function for doubles @param number @return factorial result