Documentation

Floor
in package
uses ArrayEnabled

Table of Contents

Properties

$arrayArgumentHelper  : ArrayArgumentHelper
$initializationNeeded  : bool

Methods

floor()  : array<string|int, mixed>|float|string
FLOOR.
math()  : array<string|int, mixed>|float|string
FLOOR.MATH.
precise()  : array<string|int, mixed>|float|string
FLOOR.PRECISE.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.
argsOk()  : float|string
Avoid Scrutinizer complexity problems.
argumentsOk()  : string|float
Avoid Scrutinizer problems concerning complexity.
argumentsOkPrecise()  : string|float
Avoid Scrutinizer problems concerning complexity.
floorCheck1Arg()  : void
floorMathTest()  : bool
Let FLOORMATH complexity pass Scrutinizer.
initialiseHelper()  : void
testFalse()  : bool

Properties

$initializationNeeded

private static bool $initializationNeeded = true

Methods

floor()

FLOOR.

public static floor(mixed $number[, mixed $significance = null ]) : array<string|int, mixed>|float|string

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

Excel Function: FLOOR(number[,significance])

Parameters
$number : mixed

Expect float. Number to round Or can be an array of values

$significance : mixed = null

Expect float. Significance Or can be an array of values

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

math()

FLOOR.MATH.

public static math(mixed $number[, mixed $significance = null ][, mixed $mode = 0 ]) : array<string|int, mixed>|float|string

Round a number down to the nearest integer or to the nearest multiple of significance.

Excel Function: FLOOR.MATH(number[,significance[,mode]])

Parameters
$number : mixed

Number to round Or can be an array of values

$significance : mixed = null

Significance Or can be an array of values

$mode : mixed = 0

direction to round negative numbers Or can be an array of values

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

precise()

FLOOR.PRECISE.

public static precise(array<string|int, mixed>|float $number[, array<string|int, mixed>|float $significance = 1 ]) : array<string|int, mixed>|float|string

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

Excel Function: FLOOR.PRECISE(number[,significance])

Parameters
$number : array<string|int, mixed>|float

Number to round Or can be an array of values

$significance : array<string|int, mixed>|float = 1

Significance Or can be an array of values

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

argsOk()

Avoid Scrutinizer complexity problems.

private static argsOk(float $number, float $significance, int $mode) : float|string
Parameters
$number : float
$significance : float
$mode : int
Return values
float|string

Rounded Number, or a string containing an error

argumentsOk()

Avoid Scrutinizer problems concerning complexity.

private static argumentsOk(float $number, float $significance) : string|float
Parameters
$number : float
$significance : float
Return values
string|float

argumentsOkPrecise()

Avoid Scrutinizer problems concerning complexity.

private static argumentsOkPrecise(float $number, float $significance) : string|float
Parameters
$number : float
$significance : float
Return values
string|float

floorCheck1Arg()

private static floorCheck1Arg() : void

floorMathTest()

Let FLOORMATH complexity pass Scrutinizer.

private static floorMathTest(float $number, float $significance, int $mode) : bool
Parameters
$number : float
$significance : float
$mode : int
Return values
bool

initialiseHelper()

private static initialiseHelper(array<string|int, mixed>|false $arguments) : void
Parameters
$arguments : array<string|int, mixed>|false

Can be changed to array for Php8.1+

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results