This project has moved. For the latest updates, please go here.

MathHelper class

Adds methods to Math class

double Factorial(double nb)
Calculate the factorial of a number
MathHelper.Factorial(6); // equals to 720.0 

long GreatCommonDivisor(long nb1, long nb2)
Calculate the great common divisor between 2 numbers
MathHelper.GreatCommonDivisor(3, 6); // equals to 3

long LeastCommonMultiple(long nb1, long nb2)
Calculate the least common multiple between 2 numbers
MathHelper.LeastCommonMultiple(3, 4); // equals to 12

Last edited Jul 4, 2011 at 2:41 AM by cloudlucky, version 1