def m1_m2_from_M_q(M, q):
    """Compute individual masses from total mass and mass ratio.

    Choose m1 >= m2.

    Arguments:
        M {float} -- total mass
        q {mass ratio} -- mass ratio, 0.0< q <= 1.0

    Returns:
        (float, float) -- (mass_1, mass_2)
    """

    m1 = M / (1.0 + q)
    m2 = q * m1

    return m1, m2