|
static | down ($number, $digits) |
| ROUNDDOWN.
|
|
static | even ($number) |
| EVEN.
|
|
static | multiple (mixed $number, mixed $multiple) |
| MROUND.
|
|
static | odd ($number) |
| ODD.
|
|
static | round (mixed $number, mixed $precision) |
|
static | up ($number, $digits) |
| ROUNDUP.
|
|
◆ down()
static PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::down |
( |
| $number, |
|
|
| $digits ) |
|
static |
ROUNDDOWN.
Rounds a number down to a specified number of decimal places
- Parameters
-
null | array | float | string | $number | Number to round, or can be an array of numbers |
array | float | int | string | $digits | Number of digits to which you want to round $number, or can be an array of numbers |
- Return values
-
array|float|string | Rounded Number, or a string containing an error If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions |
◆ even()
static PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::even |
( |
| $number | ) |
|
|
static |
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)
- Parameters
-
array | float | $number | Number to round, or can be an array of numbers |
- Return values
-
array|float|string | Rounded Number, or a string containing an error If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions |
◆ multiple()
static PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::multiple |
( |
mixed | $number, |
|
|
mixed | $multiple ) |
|
static |
MROUND.
Rounds a number to the nearest multiple of a specified value
- Parameters
-
mixed | $number | Expect float. Number to round, or can be an array of numbers |
mixed | $multiple | Expect int. Multiple to which you want to round, or can be an array of numbers. |
- Return values
-
array|float|int|string | Rounded Number, or a string containing an error If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions |
◆ odd()
static PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::odd |
( |
| $number | ) |
|
|
static |
ODD.
Returns number rounded up to the nearest odd integer.
- Parameters
-
array | float | $number | Number to round, or can be an array of numbers |
- Return values
-
array|float|int|string | Rounded Number, or a string containing an error If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions |
◆ up()
static PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::up |
( |
| $number, |
|
|
| $digits ) |
|
static |
ROUNDUP.
Rounds a number up to a specified number of decimal places
- Parameters
-
array | float | $number | Number to round, or can be an array of numbers |
array | int | $digits | Number of digits to which you want to round $number, or can be an array of numbers |
- Return values
-
array|float|string | Rounded Number, or a string containing an error If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions |
The documentation for this class was generated from the following file:
- lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Round.php