/// The mass passed in is in units of solar masses, and the equatorial radius is in km. The density is returned in units of grams/cc.
The mass passed in is in units of solar masses, and the equatorial radius is in km. The density is returned in units of grams/cc.
The mass passed in is in units of solar masses and the equatorial radius is in km . The density is returned in units of grams / cc .
pub fn volume_density(mass: &f64, equat_radius: &f64) -> f64 {
    let equat_radius = equat_radius * CM_PER_KM;
    let volume = (4.0 * PI * equat_radius.powf(3.0)) / 3.0;
    mass * SOLAR_MASS_IN_GRAMS / volume
}
pub fn volume_density ( mass : & f64 , equat_radius : & f64 ) -> f64 { let equat_radius = equat_radius * CM_PER_KM ; let volume = ( 4.0 * PI * equat_radius . powf ( 3.0 ) ) / 3.0 ; mass * SOLAR_MASS_IN_GRAMS / volume }
The mass passed in is in units of solar masses, and the equatorial radius is in km.
The mass passed in is in units of solar masses and the equatorial radius is in km .
mass
&f64
equat_radius
&f64