pub fn center_of_mass(&self) -> Vector3D {
        let mut total_mass = 0.0;
        let mut com = Vector3D::zero();
        for i in 0..self.size() {
            total_mass += self.particles.mass[i];
            com += self.particles.mass[i] * self.particles.position[i];
        }
        com / total_mass
    }
/// Return the center-of-mass of the configuration
Return the center-of-mass of the configuration
Return the center - of - mass of the configuration
pub fn center_of_mass(&self) -> Vector3D {
        let mut total_mass = 0.0;
        let mut com = Vector3D::zero();
        for i in 0..self.size() {
            total_mass += self.particles.mass[i];
            com += self.particles.mass[i] * self.particles.position[i];
        }
        com / total_mass
    }
pub fn center_of_mass ( & self ) -> Vector3D { let mut total_mass = 0.0 ; let mut com = Vector3D :: zero ( ) ; for i in 0 .. self . size ( ) { total_mass += self . particles . mass [ i ] ; com += self . particles . mass [ i ] * self . particles . position [ i ] ; } com / total_mass }
Return the center-of-mass of the configuration
Return the center - of - mass of the configuration
&self