Packagegraphics.numeric
Classpublic final class Factor
InheritanceFactor Inheritance Object

Implements the static behaviours of the Factor Class.



Public Methods
 MethodDefined By
  
factorial(n:uint):uint
[static] Returns the factorial of a positive integer.
Factor
  
factorialApprox(n:Number):Number
[static] Uses the Gamma function to approximate factorial - very fast.
Factor
  
fibonacci(n:Number):Number
[static] Calculates total fibonacci levels in 'n'.
Factor
  
gammaApprox(n:Number):Number
[static] Extends the domain of the factorial function by calculating the factorial of decimal numbers.
Factor
  
inverse(n:Number):Number
[static] Defines the inverse of a number.
Factor
  
logA(a:Number, n:Number):Number
[static] Defines the logarithm with base 'a' of 'n'.
Factor
  
nRoot(a:Number, n:Number):Number
[static] Defines the nth root of a number.
Factor
  
pow(a:Number, n:Number):Number
[static] Solves the negative value input bug.
Factor
  
productFactors(n:Number):Number
[static] Calculates the product of factors of 'n'.
Factor
  
square(n:Number):Number
[static] Defines the square value of a number.
Factor
  
summation(n:Number, x:Number):Number
[static] Defines the sum of all the numbers between 1 and 'n' raised to the 'x' power.
Factor
Method Detail
factorial()method
public static function factorial(n:uint):uint

Returns the factorial of a positive integer.

Parameters

n:uint — The value to use to calculate the factorial product.

Returns
uint — the factorial of a positive integer.
factorialApprox()method 
public static function factorialApprox(n:Number):Number

Uses the Gamma function to approximate factorial - very fast.

Parameters

n:Number

Returns
Number
fibonacci()method 
public static function fibonacci(n:Number):Number

Calculates total fibonacci levels in 'n'.

Parameters

n:Number

Returns
Number
gammaApprox()method 
public static function gammaApprox(n:Number):Number

Extends the domain of the factorial function by calculating the factorial of decimal numbers.

Parameters

n:Number

Returns
Number
inverse()method 
public static function inverse(n:Number):Number

Defines the inverse of a number.

Parameters

n:Number

Returns
Number
logA()method 
public static function logA(a:Number, n:Number):Number

Defines the logarithm with base 'a' of 'n'.

Parameters

a:Number — :Number a real number for 'log base'.
 
n:Number — :Number a real number.

Returns
Number — returns the logarithm with base 'a' of 'n'.
nRoot()method 
public static function nRoot(a:Number, n:Number):Number

Defines the nth root of a number.

Parameters

a:Number
 
n:Number

Returns
Number
pow()method 
public static function pow(a:Number, n:Number):Number

Solves the negative value input bug.

Parameters

a:Number
 
n:Number

Returns
Number
productFactors()method 
public static function productFactors(n:Number):Number

Calculates the product of factors of 'n'.

Parameters

n:Number

Returns
Number
square()method 
public static function square(n:Number):Number

Defines the square value of a number.

Parameters

n:Number

Returns
Number
summation()method 
public static function summation(n:Number, x:Number):Number

Defines the sum of all the numbers between 1 and 'n' raised to the 'x' power.

Parameters

n:Number
 
x:Number

Returns
Number