Method: Joules.centripetal_force_v1
- Defined in:
- lib/joules/circular_motion.rb
.centripetal_force_v1(mass, linear_velocity, radius) ⇒ Float
Note:
There is one other method for calculating centripetal force.
Calculates the centripetal force given mass, linear velocity, and radius.
112 113 114 115 116 117 118 |
# File 'lib/joules/circular_motion.rb', line 112 def centripetal_force_v1(mass, linear_velocity, radius) if radius.zero? raise ZeroDivisionError.new('divided by 0') else return (mass * (linear_velocity ** 2.0)) / radius end end |