Method: Joules.refractive_index_v2
- Defined in:
- lib/joules/waves.rb
.refractive_index_v2(critical_angle) ⇒ Float
Note:
There is one other method for calculating refractive index.
Calculates the refractive index of a substance given critical angle.
145 146 147 148 149 150 151 |
# File 'lib/joules/waves.rb', line 145 def refractive_index_v2(critical_angle) if critical_angle.zero? raise ZeroDivisionError.new('divided by 0') else return 1.0 / Math.sin(to_radians(critical_angle)) end end |