Sha256: e8dd57afc9fc9f20506285a96ebe2357e35cad9769de2a9cc891c5be6d9132b5
Contents?: true
Size: 255 Bytes
Versions: 7
Compression:
Stored size: 255 Bytes
Contents
module FeCoreExt::CoreExt end module FeCoreExt::CoreExt::Array def median return if empty? sorted = sort len = sorted.length (sorted[(len - 1) / 2] + sorted[len / 2]) / 2.0 end end class Array include FeCoreExt::CoreExt::Array end
Version data entries
7 entries across 7 versions & 1 rubygems