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


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)