The buckets start at min, so it needs to be included when calculating a score from a given percentile

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@725 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Charlie Groves
2008-08-11 23:23:17 +00:00
parent e53c8aae20
commit 8f7b90d131
@@ -194,7 +194,7 @@ public class Percentiler
public float getRequiredScore (int percentile)
{
percentile = Math.max(0, Math.min(99, percentile)); // bound this!
return _reverse[percentile] * ((float)(_max - _min) / BUCKET_COUNT);
return _reverse[percentile] * ((float)(_max - _min) / BUCKET_COUNT) + _min;
}
/**