Method: Joules.tensile_stress
- Defined in:
- lib/joules/stress_strain.rb
.tensile_stress(force, area) ⇒ Float
Calculates the tensile stress given force and area.
26 27 28 29 30 31 32 |
# File 'lib/joules/stress_strain.rb', line 26 def tensile_stress(force, area) if area.zero? raise ZeroDivisionError.new('divided by 0') else return force / area.to_f end end |