This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME TITLE | |
abusiveexperiencereport.googleapis.com Abusive Experience Report API | |
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API | |
accessapproval.googleapis.com Access Approval API | |
accesscontextmanager.googleapis.com Access Context Manager API | |
actions.googleapis.com Actions API | |
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API | |
adexchangebuyer.googleapis.com Ad Exchange Buyer API II | |
adexchangeseller.googleapis.com Ad Exchange Seller API | |
adexperiencereport.googleapis.com Ad Experience Report API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns the value at a given percentile in a sorted numeric array. | |
// "Linear interpolation between closest ranks" method | |
function percentile(arr, p) { | |
if (arr.length === 0) return 0; | |
if (typeof p !== 'number') throw new TypeError('p must be a number'); | |
if (p <= 0) return arr[0]; | |
if (p >= 1) return arr[arr.length - 1]; | |
var index = (arr.length - 1) * p, | |
lower = Math.floor(index), |