pystencils.sympyextensions.integer_functions.round_to_multiple_towards_zero#
- class pystencils.sympyextensions.integer_functions.round_to_multiple_towards_zero(arg1, arg2)#
Returns the next smaller/equal in magnitude integer divisible by given divisor.
Examples
>>> round_to_multiple_towards_zero(9, 4) 8 >>> round_to_multiple_towards_zero(11, -4) 8 >>> round_to_multiple_towards_zero(12, 4) 12 >>> round_to_multiple_towards_zero(-9, 4) -8 >>> round_to_multiple_towards_zero(-9, -4) -8