Ceiling
Table of Contents
| ceiling() | CEILING. | float|string |
|---|---|---|
| math() | CEILING.MATH. | float|string |
| precise() | CEILING.PRECISE. | float|string |
| ceilingMathTest() | Let CEILINGMATH complexity pass Scrutinizer. | bool |
| argumentsOk() | Avoid Scrutinizer problems concerning complexity. | float|string |
| floorCheck1Arg() | void |
Methods
ceiling()
CEILING.
public
static ceiling(
$number :
float
[, $significance :
float
= null ]
)
: float|string
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])
Parameters
- $number : float
the number you want the ceiling
- $significance : float = null
the multiple to which you want to round
Return values
float|string —Rounded Number, or a string containing an error
math()
CEILING.MATH.
public
static math(
$number :
mixed
[, $significance :
mixed
= null ]
, $mode :
int
)
: float|string
Round a number down to the nearest integer or to the nearest multiple of significance.
Excel Function: CEILING.MATH(number[,significance[,mode]])
Parameters
- $number : mixed
Number to round
- $significance : mixed = null
Significance
- $mode : int
direction to round negative numbers
Return values
float|string —Rounded Number, or a string containing an error
precise()
CEILING.PRECISE.
public
static precise(
$number :
mixed
[, $significance :
float
= 1 ]
)
: float|string
Rounds number up, away from zero, to the nearest multiple of significance.
Excel Function: CEILING.PRECISE(number[,significance])
Parameters
- $number : mixed
the number you want to round
- $significance : float = 1
the multiple to which you want to round
Return values
float|string —Rounded Number, or a string containing an error
ceilingMathTest()
Let CEILINGMATH complexity pass Scrutinizer.
private
static ceilingMathTest(
$significance :
float
, $number :
float
, $mode :
int
)
: bool
Parameters
- $significance : float
- $number : float
- $mode : int
Return values
boolargumentsOk()
Avoid Scrutinizer problems concerning complexity.
private
static argumentsOk(
$number :
float
, $significance :
float
)
: float|string
Parameters
- $number : float
- $significance : float
Return values
float|stringfloorCheck1Arg()
private
static floorCheck1Arg(
)
: void