PHPExcel_Calculation

# Class: PHPExcel_Calculation_MathTrig Source Location: /PHPExcel/Calculation/MathTrig.php
### Class Overview
PHPExcel_Calculation_MathTrig #### Author(s): #### Copyright: Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) | ### Methods ATAN2 CEILING COMBIN EVEN FACT FACTDOUBLE FLOOR GCD INT LCM LOG_BASE MDETERM MINVERSE MMULT MOD MROUND MULTINOMIAL ODD POWER PRODUCT QUOTIENT RAND ROMAN ROUNDDOWN ROUNDUP SERIESSUM SIGN SQRTPI SUBTOTAL SUM SUMIF SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 TRUNC
### Class Details [line 46] PHPExcel_Calculation_MathTrig #### Tags:
copyright: | Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
[ Top ] ### Class Methods ### static method ATAN2 [line 100]
`static float ATAN2( [float $xCoordinate = NULL], [float $yCoordinate = NULL])`
ATAN2 This function calculates the arc tangent of the two variables x and y. It is similar to calculating the arc tangent of y ÷ x, except that the signs of both arguments are used to determine the quadrant of the result. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between -pi and pi, excluding -pi. Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard PHP atan2() function, so we need to reverse them here before calling the PHP atan() function. Excel Function: ATAN2(xCoordinate,yCoordinate) #### Tags:
return: | The inverse tangent of the specified x- and y-coordinates.
access: | public
#### Parameters:
float | $xCoordinate | The x-coordinate of the point.
float | $yCoordinate | The y-coordinate of the point.
[ Top ] ### static method CEILING [line 139]
`static float CEILING( float $number, [float $significance = NULL])`
CEILING Returns number rounded up, away from zero, to the nearest multiple of significance. For example, if you want to avoid using pennies in your prices and your product is priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the nearest nickel. Excel Function: CEILING(number[,significance]) #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | The number you want to round.
float | $significance | The multiple to which you want to round.
[ Top ] ### static method COMBIN [line 176]
`static int COMBIN( int $numObjs, int $numInSet)`
COMBIN Returns the number of combinations for a given number of items. Use COMBIN to determine the total possible number of groups for a given number of items. Excel Function: COMBIN(numObjs,numInSet) #### Tags:
return: | Number of combinations
access: | public
#### Parameters:
int | $numObjs | Number of different objects
int | $numInSet | Number of objects in each combination
[ Top ] ### static method EVEN [line 209]
`static int EVEN( float $number)`
EVEN Returns number rounded up to the nearest even integer. You can use this function for processing items that come in twos. For example, a packing crate accepts rows of one or two items. The crate is full when the number of items, rounded up to the nearest two, matches the crate's capacity. Excel Function: EVEN(number) #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
[ Top ] ### static method FACT [line 240]
`static int FACT( float $factVal)`
FACT Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...* number. Excel Function: FACT(factVal) #### Tags:
return: | Factorial
access: | public
#### Parameters:
float | $factVal | Factorial Value
[ Top ] ### static method FACTDOUBLE [line 277]
`static int FACTDOUBLE( float $factVal)`
FACTDOUBLE Returns the double factorial of a number. Excel Function: FACTDOUBLE(factVal) #### Tags:
return: | Double Factorial
access: | public
#### Parameters:
float | $factVal | Factorial Value
[ Top ] ### static method FLOOR [line 310]
`static float FLOOR( float $number, [float $significance = NULL])`
FLOOR Rounds number down, toward zero, to the nearest multiple of significance. Excel Function: FLOOR(number[,significance]) #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
float | $significance | Significance
[ Top ] ### static method GCD [line 347]
`static integer GCD( mixed $arg,...)`
GCD Returns the greatest common divisor of a series of numbers. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder. Excel Function: GCD(number1[,number2[, ...]]) #### Tags:
return: | Greatest Common Divisor
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method INT [line 421]
`static integer INT( float $number)`
INT Casts a floating point value to an integer Excel Function: INT(number) #### Tags:
return: | Integer value
access: | public
#### Parameters:
float | $number | Number to cast to an integer
[ Top ] ### static method LCM [line 452]
`static int LCM( mixed $arg,...)`
LCM Returns the lowest common multiplier of a series of numbers The least common multiple is the smallest positive integer that is a multiple of all integer arguments number1, number2, and so on. Use LCM to add fractions with different denominators. Excel Function: LCM(number1[,number2[, ...]]) #### Tags:
return: | Lowest Common Multiplier
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method LOG_BASE [line 502]
`static float LOG_BASE( [ $number = NULL], [float $base = 10], float $value)`
LOG_BASE Returns the logarithm of a number to a specified base. The default base is 10. Excel Function: LOG(number[,base]) #### Tags:
access: | public
#### Parameters:
float | $value | The positive real number for which you want the logarithm
float | $base | The base of the logarithm. If base is omitted, it is assumed to be 10.
| $number |
[ Top ] ### static method MDETERM [line 527]
`static float MDETERM( array $matrixValues)`
MDETERM Returns the matrix determinant of an array. Excel Function: MDETERM(array) #### Tags:
access: | public
#### Parameters:
array | $matrixValues | A matrix of values
[ Top ] ### static method MINVERSE [line 569]
`static array MINVERSE( array $matrixValues)`
MINVERSE Returns the inverse matrix for the matrix stored in an array. Excel Function: MINVERSE(array) #### Tags:
access: | public
#### Parameters:
array | $matrixValues | A matrix of values
[ Top ] ### static method MMULT [line 605]
`static array MMULT( array $matrixData1, array $matrixData2)`
MMULT #### Tags:
access: | public
#### Parameters:
array | $matrixData1 | A matrix of values
array | $matrixData2 | A matrix of values
[ Top ] ### static method MOD [line 658]
`static int MOD( [int $a = 1], [int $b = 1])`
MOD #### Tags:
return: | Remainder
access: | public
#### Parameters:
int | $a | Dividend
int | $b | Divisor
[ Top ] ### static method MROUND [line 683]
`static float MROUND( float $number, int $multiple)`
MROUND Rounds a number to the nearest multiple of a specified value #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
int | $multiple | Multiple to which you want to round $number
[ Top ] ### static method MULTINOMIAL [line 709]
`static float MULTINOMIAL( array 0)`
MULTINOMIAL Returns the ratio of the factorial of a sum of values to the product of factorials. #### Tags:
access: | public
#### Parameters:
array | 0 | of mixed Data Series
[ Top ] ### static method ODD [line 743]
`static int ODD( float $number)`
ODD Returns number rounded up to the nearest odd integer. #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
[ Top ] ### static method POWER [line 778]
`static float POWER( [float $x = 0], [float $y = 2])`
POWER Computes x raised to the power y. #### Tags:
access: | public
#### Parameters:
float | $x |
float | $y |
[ Top ] ### static method PRODUCT [line 808]
`static float PRODUCT( mixed $arg,...)`
PRODUCT PRODUCT returns the product of all the values and cells referenced in the argument list. Excel Function: PRODUCT(value1[,value2[, ...]]) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method QUOTIENT [line 846]
`static float QUOTIENT( mixed $arg,...)`
QUOTIENT QUOTIENT function returns the integer portion of a division. Numerator is the divided number and denominator is the divisor. Excel Function: QUOTIENT(value1[,value2[, ...]]) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method RAND [line 878]
`static int RAND( [int $min = 0], [int $max = 0])`
RAND #### Tags:
return: | Random number
access: | public
#### Parameters:
int | $min | Minimal value
int | $max | Maximal value
[ Top ] ### static method ROMAN [line 890]
`static void ROMAN( $aValue, [ $style = 0])`
#### Tags:
access: | public
#### Parameters:
| $aValue |
| $style |
[ Top ] ### static method ROUNDDOWN [line 953]
`static float ROUNDDOWN( float $number, int $digits)`
ROUNDDOWN Rounds a number down to a specified number of decimal places #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
int | $digits | Number of digits to which you want to round $number
[ Top ] ### static method ROUNDUP [line 928]
`static float ROUNDUP( float $number, int $digits)`
ROUNDUP Rounds a number up to a specified number of decimal places #### Tags:
return: | Rounded Number
access: | public
#### Parameters:
float | $number | Number to round
int | $digits | Number of digits to which you want to round $number
[ Top ] ### static method SERIESSUM [line 980]
`static float SERIESSUM( float $x, float $n, float $m, array 3)`
SERIESSUM Returns the sum of a power series #### Tags:
access: | public
#### Parameters:
float | $x | Input value to the power series
float | $n | Initial power to which you want to raise $x
float | $m | Step by which to increase $n for each term in the series
array | 3 | of mixed Data Series
[ Top ] ### static method SIGN [line 1018]
`static int SIGN( float $number)`
SIGN Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative. #### Tags:
return: | sign value
access: | public
#### Parameters:
float | $number | Number to round
[ Top ] ### static method SQRTPI [line 1041]
`static float SQRTPI( float $number)`
SQRTPI Returns the square root of (number * pi). #### Tags:
return: | Square Root of Number * Pi
access: | public
#### Parameters:
float | $number | Number
[ Top ] ### static method SUBTOTAL [line 1064]
`static float SUBTOTAL( int 0, array 1)`
SUBTOTAL Returns a subtotal in a list or database. #### Tags:
access: | public
#### Parameters:
int | 0 | the number 1 to 11 that specifies which function to use in calculating subtotals within a list.
array | 1 | of mixed Data Series
[ Top ] ### static method SUM [line 1124]
`static float SUM( mixed $arg,...)`
SUM SUM computes the sum of all the values and cells referenced in the argument list. Excel Function: SUM(value1[,value2[, ...]]) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method SUMIF [line 1155]
`static float SUMIF( $aArgs, string $condition, [ $sumArgs = array()], mixed $arg,...)`
SUMIF Counts the number of cells that contain numbers within the list of arguments Excel Function: SUMIF(value1[,value2[, ...]],condition) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
string | $condition | The criteria that defines which cells will be summed.
| $aArgs |
| $sumArgs |
[ Top ] ### static method SUMPRODUCT [line 1191]
`static float SUMPRODUCT( mixed $arg,...)`
SUMPRODUCT Excel Function: SUMPRODUCT(value1[,value2[, ...]]) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method SUMSQ [line 1235]
`static float SUMSQ( mixed $arg,...)`
SUMSQ SUMSQ returns the sum of the squares of the arguments Excel Function: SUMSQ(value1[,value2[, ...]]) #### Tags:
access: | public
#### Parameters:
mixed | $arg,... | Data values
[ Top ] ### static method SUMX2MY2 [line 1258]
`static float SUMX2MY2( $matrixData1, $matrixData2, mixed $value)`
SUMX2MY2 #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
| $matrixData1 |
| $matrixData2 |
[ Top ] ### static method SUMX2PY2 [line 1287]
`static float SUMX2PY2( $matrixData1, $matrixData2, mixed $value)`
SUMX2PY2 #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
| $matrixData1 |
| $matrixData2 |
[ Top ] ### static method SUMXMY2 [line 1316]
`static float SUMXMY2( $matrixData1, $matrixData2, mixed $value)`
SUMXMY2 #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
| $matrixData1 |
| $matrixData2 |
[ Top ] ### static method TRUNC [line 1348]
`static float TRUNC( [float $value = 0], [int $digits = 0])`
TRUNC Truncates value to the number of fractional digits by number_digits. #### Tags:
return: | Truncated value
access: | public
#### Parameters:
float | $value |
int | $digits |
[ Top ] Documentation generated on Fri, 12 Oct 2012 00:24:35 +0200 by phpDocumentor 1.4.4