pub fn accrete_dust(
    mass: &mut f64,
    a: &f64,
    e: &f64,
    crit_mass: &f64,
    dust_bands: &mut Vec<DustBand>,
    cloud_eccentricity: &f64,
    dust_density: &f64,
    k: &f64,
) {
    let mut new_mass = *mass;
    loop {
        *mass = new_mass;
        new_mass = 0.0;

        for d in dust_bands.iter_mut() {
            new_mass += collect_dust(
                mass,
                a,
                e,
                crit_mass,
                cloud_eccentricity,
                dust_density,
                k,
                d,
            );
        }

        if !((new_mass - *mass) >= (0.0001 * *mass)) {
            break;
        }
    }
    *mass = new_mass;
}
/// "The center of mass is occupied by a star with a mass of one unit (one solar mass). All particles in the cloud are moving on elliptical orbits, with the center of mass at one focus. The density of dust (p1) within the cloud depends on a function of the form p1 = A exp (-arl/n). The overall density of gas and dust (p2) within the cloud equals Kpl, where r is distance from the center of mass (in astronomical units, a.u.) and A. a. n. and K (the vas/dust ratio) are constants."
/// "There is a spherically symmetrical cloud of dust and gas with a constant ratio of gas to dust, the density decreasing with distance from the center."

"The center of mass is occupied by a star with a mass of one unit (one solar mass). All particles in the cloud are moving on elliptical orbits, with the center of mass at one focus. The density of dust (p1) within the cloud depends on a function of the form p1 = A exp (-arl/n). The overall density of gas and dust (p2) within the cloud equals Kpl, where r is distance from the center of mass (in astronomical units, a.u.) and A. a. n. and K (the vas/dust ratio) are constants."
"There is a spherically symmetrical cloud of dust and gas with a constant ratio of gas to dust, the density decreasing with distance from the center."
" The center of mass is occupied by a star with a mass of one unit ( one solar mass ) . All particles in the cloud are moving on elliptical orbits with the center of mass at one focus . The density of dust ( p1 ) within the cloud depends on a function of the form p1 = A exp ( - arl / n ) . The overall density of gas and dust ( p2 ) within the cloud equals Kpl where r is distance from the center of mass ( in astronomical units a . u . ) and A . a . n . and K ( the vas / dust ratio ) are constants . " " There is a spherically symmetrical cloud of dust and gas with a constant ratio of gas to dust the density decreasing with distance from the center . "
pub fn accrete_dust(
    mass: &mut f64,
    a: &f64,
    e: &f64,
    crit_mass: &f64,
    dust_bands: &mut Vec<DustBand>,
    cloud_eccentricity: &f64,
    dust_density: &f64,
    k: &f64,
) {
    let mut new_mass = *mass;
    loop {
        *mass = new_mass;
        new_mass = 0.0;
        for d in dust_bands.iter_mut() {
            new_mass += collect_dust(
                mass,
                a,
                e,
                crit_mass,
                cloud_eccentricity,
                dust_density,
                k,
                d,
            );
        }
        if !((new_mass - *mass) >= (0.0001 * *mass)) {
            break;
        }
    }
    *mass = new_mass;
}
pub fn accrete_dust ( mass : & mut f64 , a : & f64 , e : & f64 , crit_mass : & f64 , dust_bands : & mut Vec < DustBand > , cloud_eccentricity : & f64 , dust_density : & f64 , k : & f64 , ) { let mut new_mass = * mass ; loop { * mass = new_mass ; new_mass = 0.0 ; for d in dust_bands . iter_mut ( ) { new_mass += collect_dust ( mass , a , e , crit_mass , cloud_eccentricity , dust_density , k , d , ) ; } if ! ( ( new_mass - * mass ) >= ( 0.0001 * * mass ) ) { break ; } } * mass = new_mass ; }
"The center of mass is occupied by a star with a mass of one unit (one solar mass).
" The center of mass is occupied by a star with a mass of one unit ( one solar mass ) .
mass
&mut f64
a
&f64
e
&f64
crit_mass
&f64
dust_bands
&mut Vec<DustBand>
cloud_eccentricity
&f64
dust_density
&f64
k
&f64
mass
&mut f64
a
&f64
e
&f64
crit_mass
&f64
dust_bands
&mut Vec<DustBand>
cloud_eccentricity
&f64
dust_density
&f64
k
&f64