aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/python/runtime/_couscous.py
blob: 70d9a9723ebfaeabc2b5e350833ca2d91f4caf11 (plain)
1
2
3
4
5
6
7
8
9
10
11
from .java.lang.Integer import Integer


def _div_round_to_zero(a, b):
    return -(-a // b) if (a < 0) ^ (b < 0) else a // b

def _mod_round_to_zero(a, b):
    return -(-a % b) if (a < 0) ^ (b < 0) else a % b
    
def boxInt(value):
    return Integer(value)