Skip to content

Commit

Permalink
Add method for getting the magnitude of the escape velocity from a mass
Browse files Browse the repository at this point in the history
It's not all stars, but square roots!
  • Loading branch information
TheHappyKoala committed Jan 19, 2019
1 parent b3c8a96 commit 80052d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/Physics/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,7 @@ export function createParticleSystem(vectors, axis, tilt, primary) {

return tiltedVectors;
}

export function getEscVMag(g, mass, scale) {
return Math.sqrt(2 * (g * mass.m) / (mass.radius / scale));
}

0 comments on commit 80052d8

Please sign in to comment.