/// This function implements the escape velocity calculation. Note that it appears that Fogg's eq.15 is i/ncorrect.
/// The mass is in units of solar mass, the radius in kilometers, and the velocity returned is in cm/sec.
This function implements the escape velocity calculation. Note that it appears that Fogg's eq.15 is i/ncorrect.
The mass is in units of solar mass, the radius in kilometers, and the velocity returned is in cm/sec.
This function implements the escape velocity calculation . Note that it appears that Fogg ' s eq . 15 is i / ncorrect . The mass is in units of solar mass the radius in kilometers and the velocity returned is in cm / sec .
pub fn escape_vel(mass: &f64, radius: &f64) -> f64 {
    let mass_in_grams = mass * SOLAR_MASS_IN_GRAMS;
    let radius_in_cm = radius * CM_PER_KM;
    (2.0 * GRAV_CONSTANT * mass_in_grams / radius_in_cm).sqrt()
}
pub fn escape_vel ( mass : & f64 , radius : & f64 ) -> f64 { let mass_in_grams = mass * SOLAR_MASS_IN_GRAMS ; let radius_in_cm = radius * CM_PER_KM ; ( 2.0 * GRAV_CONSTANT * mass_in_grams / radius_in_cm ) . sqrt ( ) }
This function implements the escape velocity calculation.
This function implements the escape velocity calculation .
mass
&f64
radius
&f64