HH\Lib\Math\int_div
Returns the result of integer division of $numerator
by $denominator
namespace HH\Lib\Math;
function int_div(
int $numerator,
int $denominator,
): int;
To round a single value, see Math\floor()
.
Parameters
int $numerator
int $denominator
Returns
int
Examples
$result1 = Math\int_div(8, 4);
echo "Integer division of 8 by 4 yields $result1 \n";
$result2 = Math\int_div(7, 4);
echo "Integer division of 7 by 4 yields $result2 \n";