Method: PhysicsPlus::Optics.power_lens

Defined in:
lib/physics_plus/optics.rb

.power_lens(focal_length) ⇒ Object



12
13
14
15
16
17
# File 'lib/physics_plus/optics.rb', line 12

def self.power_lens(focal_length)
  raise 'optical distance must be positive' if focal_length.negative?
  raise 'optical distance must not be zero' if focal_length.zero?
  
  1/focal_length.to_f
end