Method: Joules.gravitational_potential_energy
- Defined in:
- lib/joules/energy_work_power.rb
.gravitational_potential_energy(mass, height) ⇒ Float
Calculates the gravitational potential energy given mass and height.
25 26 27 |
# File 'lib/joules/energy_work_power.rb', line 25 def gravitational_potential_energy(mass, height) return mass * FREE_FALL_ACCELERATION * height end |