You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that the array with the values passed gets sorted in place, and that this is undocumented behaviour, which can cause problems if you don't expect the passed array to be sorted afterwards.
Simple fix is to pass it via, so that a copy is created beforehand: percentile(50, myArray.slice(0))
I'll submit a PR for it myself if I get around to it...
The text was updated successfully, but these errors were encountered:
I just noticed that the array with the values passed gets sorted in place, and that this is undocumented behaviour, which can cause problems if you don't expect the passed array to be sorted afterwards.
Simple fix is to pass it via, so that a copy is created beforehand:
percentile(50, myArray.slice(0))
I'll submit a PR for it myself if I get around to it...
The text was updated successfully, but these errors were encountered: