Method: Joules.angular_velocity_v1
- Defined in:
- lib/joules/circular_motion.rb
.angular_velocity_v1(linear_velocity, radius) ⇒ Float
Note:
There is one other method for calculating angular velocity.
Calculates the angular velocity given linear velocity and radius.
27 28 29 30 31 32 33 |
# File 'lib/joules/circular_motion.rb', line 27 def angular_velocity_v1(linear_velocity, radius) if radius.zero? raise ZeroDivisionError.new('divided by 0') else return linear_velocity / radius.to_f end end |