public static function getModuloFromEntirePart($a, $b)
    {
        $div = round($a/$b, 0, (($a/$b)>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        $a = round($a, 0, ($a>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        $b = round($b, 0, ($b>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        return ($a - ($div * $b));
    }
public static function getModuloFromEntirePart($a, $b)
    {
        $div = round($a/$b, 0, (($a/$b)>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        $a = round($a, 0, ($a>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        $b = round($b, 0, ($b>=0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP));
        return ($a - ($div * $b));
    }
public static function getModuloFromEntirePart ( $ a , $ b ) { $ div = round ( $ a / $ b , 0 , ( ( $ a / $ b ) >= 0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP ) ) ; $ a = round ( $ a , 0 , ( $ a >= 0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP ) ) ; $ b = round ( $ b , 0 , ( $ b >= 0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP ) ) ; return ( $ a - ( $ div * $ b ) ) ; }
This method is an alternative to the native `a % b` using the "entire part" method.
The result will always be in range `[0 ; b[` and have the same sign as `b`.

@param $a
@param $b
@return float
This method is an alternative to the native a % b using the entire part method . The result will always be in range [ 0 ; b [ and have the same sign as b .