Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# nearest-rank percentile, assumes sorted array
function ceil(valor)
{
return (valor == int(valor)) ? valor : int(valor)+1
}
function p(k, values) {
return values[ceil((k / 100) * length(values))]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.