def get_fix_range_value(tot_elms, index):
    """Percentage value of the given index in a set of elements.

    The value returned is in the middle:

    For example:

    0.0               1.0
     |-----|-----|-----|
        ^     ^     ^

    Params:
        tot_elems (int): number of elements in the set
        index (int): the index of the current element,
                     starting from 1

    Return:
        float: percentage with dot notation,
               so from 0.0 to 1.0

    """
    step = (1. / tot_elms) / 2.
    return float((index / tot_elms) - step)