Skip to content

Instantly share code, notes, and snippets.

@nervoussystem
Created May 20, 2010 21:21
Show Gist options
  • Select an option

  • Save nervoussystem/408124 to your computer and use it in GitHub Desktop.

Select an option

Save nervoussystem/408124 to your computer and use it in GitHub Desktop.
for(int i=0;i<particles.size();++i) {
Particle p = (Particle) particles.get(i);
p.position = p.position+deltaT*p.velocity;
p.velocity = p.velocity+deltaT*p.force/p.mass;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment