/** * Gets the probability that a enchantment set will be selected. * * @param mel the mel of this enchantment set * @param depth the depth to calculate to * @param enca the set of enchantments to chose from * @param enc the enchantments in the set to check * @return the probability of that enchantment set without the mel probability */ public static double getProbability(int mel, int depth, Enchantment[] enca, Enchantment... enc) { int length = enc.length; int tweight = calculateTWeight(enca); // Create output varable double prob; prob = caculateTSubP(mel, depth) * caculateTEncP(tweight, enc) * Factorial.Factorial((byte) depth); return prob; }