Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/geostats/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#avg ⇒ Object
2 3 4 |
# File 'lib/geostats/core_ext.rb', line 2 def avg length.zero? ? 0 : sum.to_f / length.to_f end |