private def percentile()

in app/utils/Stats.scala [6:17]


  private def percentile(s: Seq[Int], p: Int): Option[Int] = {
    if (p < percentilesRange.min || p > percentilesRange.max) None
    s.sortWith(_ < _) match {
      case Nil => None
      case nonEmptySeq =>
        Some(
          nonEmptySeq(
            Math.ceil((s.length - 1) * p / percentilesRange.max).toInt
          )
        )
    }
  }