Method: Joules.max_particle_speed

Defined in:
lib/joules/oscillations.rb

.max_particle_speed(angular_velocity, amplitude) ⇒ Float

Calculates the maximum speed of a particle in oscillation given angular velocity and amplitude.

Examples:

Joules.maximum_speed(2.4, 5) #=> 12.0

Parameters:

  • angular_velocity (Int, Float)

    angular_velocity is in radians per second

  • amplitude (Int, Float)

    amplitude >= 0; amplitude is in metres

Returns:

  • (Float)

    return value is in metres per second



78
79
80
# File 'lib/joules/oscillations.rb', line 78

def max_particle_speed(angular_velocity, amplitude)
  return angular_velocity * amplitude.to_f
end