• the reference percentile_nearest_rank. The nearest-rank method returns an actual member of the window rather than interpolating between two, so a 50th percentile over an even-length window is the upper of the two middles, not their mean. That difference is visible on Median's default length of 3.

    Parameters

    • values: readonly number[]
    • period: number
    • percentage: number

    Returns number[]