Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/compute-io/midrange into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
Planeshifter committed Jun 9, 2015
2 parents b2fefec + ad992ec commit e570b2c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -7,7 +7,7 @@ Mid-range
The __mid-range__, or __mid-extreme__, is the arithmetic mean of the maximum and minimum values in a data set. It is the midpoint of the range and a measure of central tendency. It is defined as

<div class="equation" align="center" data-raw-text="M=\frac{ x_{(N)} + x_{(1)} }{2}." data-equation="eq:midrange">
<img src="" alt="Equation for mid-range.">
<img src="https://cdn.rawgit.com/compute-io/midrange/a7b170caec560a62312238241109d3d483ae0ad6/docs/img/eqn1.svg" alt="Equation for mid-range.">
<br>
</div>

Expand All @@ -24,15 +24,14 @@ For use in the browser, use [browserify](https://github.com/substack/node-browse

## Usage

To use the module,

``` javascript
var midrange = require( 'compute-midrange' );
```

#### midrange( x[, opts] )

Computes the mid-range of a numeric `array`.
Computes the [mid-range](http://en.wikipedia.org/wiki/Mid-range). `x` may be either an [`array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array), [`typed array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays), or [`matrix`](https://github.com/dstructs/matrix).


``` javascript
var unsorted = [ 8, 2, 3, 9, 5, 1, 4, 100, 7, 0, 6 ];
Expand Down

0 comments on commit e570b2c

Please sign in to comment.