def centerSM(coorSM, maxS, maxM):
    """
    Center vector coorSM in both S and M axes.

    :param coorSM: coordinate of vector from S to M centers.
    :param maxS: value representing end of estatic axis.
    :param maxM: value representing end of mobile axis.
    :return: SM centered coordinate.
    """
    return int((maxS) / 2.0 + coorSM - (maxM) / 2.0)