Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
public static function MOD($a = 1, $b = 1)
    {
        $a = (float) Functions::flattenSingleValue($a);
        $b = (float) Functions::flattenSingleValue($b);

        if ($b == 0.0) {
            return Functions::DIV0();
        } elseif (($a < 0.0) && ($b > 0.0)) {
            return $b - fmod(abs($a), $b);
        } elseif (($a > 0.0) && ($b < 0.0)) {
            return $b + fmod($a, abs($b));
        }

        return fmod($a, $b);
    }
public static function MOD($a = 1, $b = 1)
    {
        $a = (float) Functions::flattenSingleValue($a);
        $b = (float) Functions::flattenSingleValue($b);

        if ($b == 0.0) {
            return Functions::DIV0();
        } elseif (($a < 0.0) && ($b > 0.0)) {
            return $b - fmod(abs($a), $b);
        } elseif (($a > 0.0) && ($b < 0.0)) {
            return $b + fmod($a, abs($b));
        }

        return fmod($a, $b);
    }
public static function MOD ( $ a = 1 , $ b = 1 ) { $ a = ( float ) Functions :: flattenSingleValue ( $ a ) ; $ b = ( float ) Functions :: flattenSingleValue ( $ b ) ; if ( $ b == 0.0 ) { return Functions :: DIV0 ( ) ; } elseif ( ( $ a < 0.0 ) && ( $ b > 0.0 ) ) { return $ b - fmod ( abs ( $ a ) , $ b ) ; } elseif ( ( $ a > 0.0 ) && ( $ b < 0.0 ) ) { return $ b + fmod ( $ a , abs ( $ b ) ) ; } return fmod ( $ a , $ b ) ; }
MOD.

@param int $a Dividend
@param int $b Divisor

@return int Remainder
MOD .