src/Utility/Math.php
public static function floorDiv(int $a, int $b) : int
    {
        $r = \intdiv($a, $b);

        // If the signs are different and modulo not zero, round down.
        if (($a ^ $b) < 0 && ($r * $b !== $a)) {
            $r--;
        }

        return $r;
    }
public static function floorDiv(int $a, int $b) : int
    {
        $r = \intdiv($a, $b);

        // If the signs are different and modulo not zero, round down.
        if (($a ^ $b) < 0 && ($r * $b !== $a)) {
            $r--;
        }

        return $r;
    }
public static function floorDiv ( int $ a , int $ b ) : int { $ r = \ intdiv ( $ a , $ b ) ; // If the signs are different and modulo not zero, round down. if ( ( $ a ^ $ b ) < 0 && ( $ r * $ b !== $ a ) ) { $ r -- ; } return $ r ; }
Returns the largest integer value that is less than or equal to the algebraic quotient.

@param int $a The first argument.
@param int $b The second argument, non-zero.

@return int
Returns the largest integer value that is less than or equal to the algebraic quotient .