def calculate_octant(vector):
    """Calculates in which octant vector lies and returns the normalized vector for this octant.
    
    :param vector: given vector
    :type vector: array
    :rtype: normalized vector
    """
    #Small offset between octants
    epsilon = 30
    if epsilon > vector[0] and vector[0] > -epsilon:
        direction_x = 0
    else:
        if vector[0] > 0:
            direction_x = 1
        else:
            direction_x = -1
    if epsilon > vector[1] and vector[1] > -epsilon:
        direction_y = 0
    else:
        if vector[1] > 0:
            direction_y = 1
        else:
            direction_y = -1
    #Normalize
    if not direction_y == 0 and not direction_x == 0:
        if direction_y < 0:
            direction_y = -0.75
        else:
            direction_y = 0.75
        if direction_x < 0:
            direction_x = -0.75
        else:
            direction_x = 0.75
    return (direction_x, direction_y)