Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/geostats/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#avgObject



2
3
4
# File 'lib/geostats/core_ext.rb', line 2

def avg
  length.zero? ? 0 : sum.to_f / length.to_f
end