/** 
 * Module de calcul
 */ 
const calcul = ( function() {

    let calcul = {};

    /** 
     * @param a {number}
     * @param b {number}
     * @return {number}
     */
    function division( a, b ) {
        if ( b == 0 )
            throw new Error( "Division par zéro" );
        return a / b;
    }

    /** 
     * @param a {number}
     * @param b {number}
     * @return {number}
     */    
    function somme( a, b ) {
        return a + b;
    }

    calcul.division = division;
    calcul.somme = somme;
    return calcul;

} )();

export { calcul };

