ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/CutoffGroup.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/CutoffGroup.hpp (file contents):
Revision 1159 by tim, Tue May 11 21:20:34 2004 UTC vs.
Revision 1164 by tim, Wed May 12 15:02:03 2004 UTC

# Line 49 | Line 49 | class CutoffGroup{
49          mass = atom->getMass();
50          totalMass += mass;
51          atom->getPos(pos);
52 <        com[0] = pos[0] * mass;
53 <        com[1] = pos[1] * mass;
54 <        com[2] = pos[2] * mass;
52 >        com[0] += pos[0] * mass;
53 >        com[1] += pos[1] * mass;
54 >        com[2] += pos[2] * mass;
55        }
56  
57        com[0] /= totalMass;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines