percentileOrNull

@JvmName(name = "percentileOrNullOfInt")
fun List<Int>.percentileOrNull(p: Double): Double?
@JvmName(name = "percentileOrNullOfLong")
fun List<Long>.percentileOrNull(p: Double): Double?

Returns the p-th percentile of this list, or null if the list is empty.

Throws

if p is not in the range 0.0 to 100.0.