pub fn generate(n_bodies: i32) -> Self {
    let bodies: Vec<GravitationalBody> = (0..n_bodies)
      .map(|_| GravitationalBody::generate())
      .collect();
    Self {
      g: 10.0.powi(3),
      bodies,
      n_bodies,
    }
  }
/// Simple generator with fixed `g` and randomized GravitationalBodies
Simple generator with fixed `g` and randomized GravitationalBodies
Simple generator with fixed ` g ` and randomized GravitationalBodies
pub fn generate(n_bodies: i32) -> Self {
    let bodies: Vec<GravitationalBody> = (0..n_bodies)
      .map(|_| GravitationalBody::generate())
      .collect();
    Self {
      g: 10.0.powi(3),
      bodies,
      n_bodies,
    }
  }
pub fn generate ( n_bodies : i32 ) -> Self { let bodies : Vec < GravitationalBody > = ( 0 .. n_bodies ) . map ( | _ | GravitationalBody :: generate ( ) ) . collect ( ) ; Self { g : 10.0 . powi ( 3 ) , bodies , n_bodies , } }
Simple generator with fixed `g` and randomized GravitationalBodies
Simple generator with fixed ` g ` and randomized GravitationalBodies
n_bodies
i32