pub fn force(&self, x: f32, y: f32) -> (f32, f32) {
    let f_x = self.force_x(x, y);
    let f_y = self.force_y(x, y);
    let unit_vec = f_x.hypot(f_y);
    (f_x / unit_vec, f_y / unit_vec)
  }
/// Calculate the sum of all gravitational forces on the point.
/// Returns a tuple of (Force_x, Force_y)
/// where each force component is normalized
/// Based on the "Restricted three body problem"
/// References:
///   https://en.wikipedia.org/wiki/Three-body_problem
///   https://physics.stackexchange.com/questions/17285/split-gravitational-force-into-x-y-and-z-componenets
Calculate the sum of all gravitational forces on the point.
Calculate the sum of all gravitational forces on the point .
pub fn force(&self, x: f32, y: f32) -> (f32, f32) {
    let f_x = self.force_x(x, y);
    let f_y = self.force_y(x, y);
    let unit_vec = f_x.hypot(f_y);
    (f_x / unit_vec, f_y / unit_vec)
  }
pub fn force ( & self , x : f32 , y : f32 ) -> ( f32 , f32 ) { let f_x = self . force_x ( x , y ) ; let f_y = self . force_y ( x , y ) ; let unit_vec = f_x . hypot ( f_y ) ; ( f_x / unit_vec , f_y / unit_vec ) }
Calculate the sum of all gravitational forces on the point.
Calculate the sum of all gravitational forces on the point .
&self
x
f32
y
f32