Framework Mono – Math/MathCombinatorics.as

The MathCombinatorics.as script will help you to get values of math combinatory. You will not need to instance this class, just call the static functions.


Getting a Factorial

To calculate the factorial of a number, for example, 2, just do the following:

 MathCombinatorics.getFactorial(2);

Getting the Binomial Coefficient

To calculate the binomial coefficient between to numbers, for example, of 1 and 2, just do the following:

 MathCombinatorics.getBinomialCoefficient(1, 2);

Public Static Functions

  • getFactorial(value:uint):uint
  • getBinomialCoefficient(firstValue:uint, secondValue:uint):uint