

def angle(self, x, y):
    result = Double.NaN
    if (x == 0):
        if (y > 0):
            result = (math.pi / 2.0)
        elif (y < 0):
            result = ((3 * math.pi) / 2.0)
    elif ((x > 0) and (y >= 0)):
        result = math.atan((y / x))
    elif ((x < 0) and (y >= 0)):
        result = (math.pi - math.atan(((- y) / x)))
    elif ((x < 0) and (y < 0)):
        result = (math.pi + math.atan((y / x)))
    elif ((x > 0) and (y < 0)):
        result = ((2 * math.pi) - math.atan(((- y) / x)))
    return result

dataset/ETHPy150Open anandology/pyjamas/library/gwt/chart/SymbolType.py PieSliceSymbolType.angle/original