class Floor extends NumberMutator (View source)

Rounds a number down. Optionally with a given precision.

Methods

__construct(int $precision = 0)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
static Floor
make(int $precision = 0)

No description

mixed
mutate(mixed $value)

Mutate the input value.

float|int
mutateNumber(float|int $value)

No description

Details

__construct(int $precision = 0)

No description

Parameters

int $precision

The precision to round to.

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static Floor make(int $precision = 0)

No description

Parameters

int $precision

The precision to round to.

Return Value

Floor

mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected float|int mutateNumber(float|int $value)

No description

Parameters

float|int $value

Return Value

float|int