PHPExcel_Calculation
[ class tree: PHPExcel_Calculation ] [ index: PHPExcel_Calculation ] [ all elements ]

Class: PHPExcel_Calculation_MathTrig

Source Location: /PHPExcel/Calculation/MathTrig.php

Class Overview


PHPExcel_Calculation_MathTrig


Author(s):

Copyright:

  • Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

Methods



Class Details

[line 46]
PHPExcel_Calculation_MathTrig



Tags:

copyright:  Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)


[ Top ]


Class Methods


static method ATAN2 [line 100]

static float ATAN2( float $xCoordinate, float $yCoordinate)

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 121]

static float CEILING( float $number, [float $significance = null])

CEILING

Returns number rounded up, away from zero, to the nearest multiple of significance.




Tags:

return:  Rounded Number
access:  public


Parameters:

float   $number   Number to round
float   $significance   Significance

[ Top ]

static method COMBIN [line 153]

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.




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 177]

static int EVEN( float $number)

EVEN

Returns number rounded up to the nearest even integer.




Tags:

return:  Rounded Number
access:  public


Parameters:

float   $number   Number to round

[ Top ]

static method FACT [line 198]

static int FACT( float $factVal)

FACT

Returns the factorial of a number.




Tags:

return:  Factorial
access:  public


Parameters:

float   $factVal   Factorial Value

[ Top ]

static method FACTDOUBLE [line 230]

static int FACTDOUBLE( float $factVal)

FACTDOUBLE

Returns the double factorial of a number.




Tags:

return:  Double Factorial
access:  public


Parameters:

float   $factVal   Factorial Value

[ Top ]

static method FLOOR [line 257]

static float FLOOR( float $number, [float $significance = null])

FLOOR

Rounds number down, toward zero, to the nearest multiple of significance.




Tags:

return:  Rounded Number
access:  public


Parameters:

float   $number   Number to round
float   $significance   Significance

[ Top ]

static method GCD [line 287]

static int GCD( $array 0)

GCD

Returns the greatest common divisor of a series of numbers




Tags:

return:  Greatest Common Divisor
access:  public


Parameters:

$array   0   Values to calculate the Greatest Common Divisor

[ Top ]

static method INT [line 348]

static integer INT( float $number)

INT

Casts a floating point value to an integer




Tags:

return:  Integer value
access:  public


Parameters:

float   $number   Number to cast to an integer

[ Top ]

static method LCM [line 366]

static int LCM( $array 0)

LCM

Returns the lowest common multiplier of a series of numbers




Tags:

return:  Lowest Common Multiplier
access:  public


Parameters:

$array   0   Values to calculate the Lowest Common Multiplier

[ Top ]

static method LOG_BASE [line 416]

static float LOG_BASE( $number, [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 430]

static float MDETERM( array $matrixValues)

MDETERM



Tags:

access:  public


Parameters:

array   $matrixValues   A matrix of values

[ Top ]

static method MINVERSE [line 464]

static array MINVERSE( array $matrixValues)

MINVERSE



Tags:

access:  public


Parameters:

array   $matrixValues   A matrix of values

[ Top ]

static method MMULT [line 499]

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 550]

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 575]

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 601]

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 635]

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 666]

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 693]

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 731]

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 763]

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 775]

static void ROMAN( $aValue, [ $style = 0])



Tags:

access:  public


Parameters:

   $aValue  
   $style  

[ Top ]

static method ROUNDDOWN [line 837]

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 812]

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 864]

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 902]

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 923]

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 946]

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 1006]

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 1037]

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 1068]

static float SUMPRODUCT( mixed $value)

SUMPRODUCT



Tags:

access:  public


Parameters:

mixed   $value   Value to check

[ Top ]

static method SUMSQ [line 1106]

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 1129]

static float SUMX2MY2( $matrixData1, $matrixData2, mixed $value)

SUMX2MY2



Tags:

access:  public


Parameters:

mixed   $value   Value to check
   $matrixData1  
   $matrixData2  

[ Top ]

static method SUMX2PY2 [line 1158]

static float SUMX2PY2( $matrixData1, $matrixData2, mixed $value)

SUMX2PY2



Tags:

access:  public


Parameters:

mixed   $value   Value to check
   $matrixData1  
   $matrixData2  

[ Top ]

static method SUMXMY2 [line 1187]

static float SUMXMY2( $matrixData1, $matrixData2, mixed $value)

SUMXMY2



Tags:

access:  public


Parameters:

mixed   $value   Value to check
   $matrixData1  
   $matrixData2  

[ Top ]

static method TRUNC [line 1219]

static float TRUNC( [float $value = 0], [int $number_digits = 0])

TRUNC

Truncates value to the number of fractional digits by number_digits.




Tags:

return:  Truncated value
access:  public


Parameters:

float   $value  
int   $number_digits  

[ Top ]


Documentation generated on Sun, 27 Feb 2011 16:32:39 -0800 by phpDocumentor 1.4.3