pub fn eccentric_anomaly(e: f64, m: f64) -> f64 {
        let deg_from_rad = 180f64 / consts::PI;
        let mut ecc: f64 = m + (e * sin_deg!(m) * (1f64 + (e * cos_deg!(m))));

        let mut iters = 0;
        loop {
            let f: f64 =
                ecc - (ecc - (deg_from_rad * e * sin_deg!(ecc)) - m) / (1f64 - e * cos_deg!(ecc));
            let error = (f - ecc).abs();
            ecc = f;

            if error < 0.1e-8 || iters > 30 {
                break;
            }

            iters += 1;
        }

        ecc
    }
/// Calculate the eccentric anomaly for a given body.
/// ### Arguments
/// * 'e' - TODO
/// * 'm' - TODO
///
/// ### Returns
///      The eccentric anomaly for the provided input parameters.
Calculate the eccentric anomaly for a given body.
Calculate the eccentric anomaly for a given body .
pub fn eccentric_anomaly(e: f64, m: f64) -> f64 {
        let deg_from_rad = 180f64 / consts::PI;
        let mut ecc: f64 = m + (e * sin_deg!(m) * (1f64 + (e * cos_deg!(m))));
        let mut iters = 0;
        loop {
            let f: f64 =
                ecc - (ecc - (deg_from_rad * e * sin_deg!(ecc)) - m) / (1f64 - e * cos_deg!(ecc));
            let error = (f - ecc).abs();
            ecc = f;
            if error < 0.1e-8 || iters > 30 {
                break;
            }
            iters += 1;
        }
        ecc
    }
pub fn eccentric_anomaly ( e : f64 , m : f64 ) -> f64 { let deg_from_rad = 180f64 / consts :: PI ; let mut ecc : f64 = m + ( e * sin_deg ! ( m ) * ( 1f64 + ( e * cos_deg ! ( m ) ) ) ) ; let mut iters = 0 ; loop { let f : f64 = ecc - ( ecc - ( deg_from_rad * e * sin_deg ! ( ecc ) ) - m ) / ( 1f64 - e * cos_deg ! ( ecc ) ) ; let error = ( f - ecc ) . abs ( ) ; ecc = f ; if error < 0.1e-8 || iters > 30 { break ; } iters += 1 ; } ecc }
Calculate the eccentric anomaly for a given body.
Calculate the eccentric anomaly for a given body .
The eccentric anomaly for the provided input parameters.
The eccentric anomaly for the provided input parameters .
e
f64
m
f64