Skip to content

Commit

Permalink
[UPDATE] README v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Jun 15, 2015
1 parent 1271409 commit ca2bc15
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ The `quantile` function supports nine methods to calculate the sample quantiles:

The default method is type `7`. To specify a different method, you can set the `method` option to the respective number.

``` javascript
var unsorted, q;

unsorted = [ 4, 3, 5, 1, 2 ];
q = quantile( unsorted, 0.25, {
'method': 4
});
// returns 1.25

q = quantile( unsorted, 0.25, {
'method': 7
});
// returns 2
```

If the input `array` is already sorted in __ascending__ order, you can set the `sorted` option to `true`.

``` javascript
Expand Down

0 comments on commit ca2bc15

Please sign in to comment.