HH\Lib\Math\floor
Returns the largest integer value less than or equal to $value
namespace HH\Lib\Math;
function floor(
num $value,
): float;
- To find the smallest integer value greater than or equal to
$value
, seeMath\ceil()
. - To find the largest integer value less than or equal to a ratio, see
Math\int_div()
.
Parameters
num $value
Returns
float
Examples
$floor1 = Math\floor(4.7);
echo "Floor of 4.7 is $floor1 \n";
$floor2 = Math\floor(5);
echo "Floor or 5 is $floor2 \n";