mtrc 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,12 @@ class Mtrc::SortedSamples < Mtrc::Samples
44
44
  # Returns the sample at probrotion f of the list. For example, at(.95) is
45
45
  # the 95th percentile value.
46
46
  def at(f)
47
- self[(f * @ns.size).round]
47
+ i = (f * @ns.size).floor
48
+ if i == @ns.size
49
+ @ns[i - 1]
50
+ else
51
+ @ns[i]
52
+ end
48
53
  end
49
54
 
50
55
  def clear
@@ -1,3 +1,3 @@
1
1
  module Mtrc
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtrc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: