aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/python/runtime/_couscous.py
blob: aa108a5cafcf9d32e86814445d54ce23afeb6938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)

def boxBoolean(value):
    return Boolean(value)