def calcDiagonalIndex(position) :
    """
    Given the position of the node, returns the index of the diagonal it belongs to.
    """

    # Calculate the index
    diag_index = (position[1] -  position[0]) // 2

    # Return the index
    return diag_index