fn check_orbits_intersect(
    p1_a: f64,
    p1_e: f64,
    p1_mass: f64,
    p2_a: f64,
    p2_e: f64,
    p2_mass: f64,
) -> bool {
    let diff = p2_a - p1_a;
    let (dist1, dist2) = match diff > 0.0 {
        true => {
            let dist1 = outer_effect_limit(&p1_a, &p1_e, &p1_mass) - p1_a;
            let dist2 = p2_a - inner_effect_limit(&p2_a, &p2_e, &p2_mass);
            (dist1, dist2)
        }
        false => {
            let dist1 = p1_a - inner_effect_limit(&p1_a, &p1_e, &p1_mass);
            let dist2 = outer_effect_limit(&p2_a, &p2_e, &p2_mass) - p2_a;
            (dist1, dist2)
        }
    };
    diff.abs() < dist1.abs() || diff.abs() < dist2.abs()
}
/// Check if planetesimals have an overlapping orbits
Check if planetesimals have an overlapping orbits
Check if planetesimals have an overlapping orbits
fn check_orbits_intersect(
    p1_a: f64,
    p1_e: f64,
    p1_mass: f64,
    p2_a: f64,
    p2_e: f64,
    p2_mass: f64,
) -> bool {
    let diff = p2_a - p1_a;
    let (dist1, dist2) = match diff > 0.0 {
        true => {
            let dist1 = outer_effect_limit(&p1_a, &p1_e, &p1_mass) - p1_a;
            let dist2 = p2_a - inner_effect_limit(&p2_a, &p2_e, &p2_mass);
            (dist1, dist2)
        }
        false => {
            let dist1 = p1_a - inner_effect_limit(&p1_a, &p1_e, &p1_mass);
            let dist2 = outer_effect_limit(&p2_a, &p2_e, &p2_mass) - p2_a;
            (dist1, dist2)
        }
    };
    diff.abs() < dist1.abs() || diff.abs() < dist2.abs()
}
fn check_orbits_intersect ( p1_a : f64 , p1_e : f64 , p1_mass : f64 , p2_a : f64 , p2_e : f64 , p2_mass : f64 , ) -> bool { let diff = p2_a - p1_a ; let ( dist1 , dist2 ) = match diff > 0.0 { true => { let dist1 = outer_effect_limit ( & p1_a , & p1_e , & p1_mass ) - p1_a ; let dist2 = p2_a - inner_effect_limit ( & p2_a , & p2_e , & p2_mass ) ; ( dist1 , dist2 ) } false => { let dist1 = p1_a - inner_effect_limit ( & p1_a , & p1_e , & p1_mass ) ; let dist2 = outer_effect_limit ( & p2_a , & p2_e , & p2_mass ) - p2_a ; ( dist1 , dist2 ) } } ; diff . abs ( ) < dist1 . abs ( ) || diff . abs ( ) < dist2 . abs ( ) }
Check if planetesimals have an overlapping orbits
Check if planetesimals have an overlapping orbits
p1_a
f64
p1_e
f64
p1_mass
f64
p2_a
f64
p2_e
f64
p2_mass
f64
p1_a
f64
p1_e
f64
p1_mass
f64
p2_a
f64
p2_e
f64
p2_mass
f64