openlayers/ol3 — pull request #956 by tschaub (2013-09-03 23:55:01+00:00)
Title: Change structure for ol.Extent

Our current structure for `ol.Extent` is `Array.`. The order of the numbers is `[minX, maxX, minY, maxY, ..., minN, maxN]`.

I believe it would be intuitive for people to use `Array.` instead. Where the order of coordinates is `[minCoord, maxCoord]`.

For prior art, see [`d3.geo.bounds`](https://github.com/mbostock/d3/wiki/Geo-Paths#wiki-bounds) (also used by [`brush.extent`](https://github.com/mbostock/d3/wiki/SVG-Controls#wiki-brush_extent), [`path.bounds`](https://github.com/mbostock/d3/wiki/Geo-Paths#wiki-path_bounds), [`graticule.extent`](https://github.com/mbostock/d3/wiki/Geo-Paths#wiki-graticule_extent), etc.) and [`L.bounds`](http://leafletjs.com/reference.html#bounds). The [`google.maps.LatLngBounds` constructor](https://developers.google.com/maps/documentation/javascript/reference#LatLngBounds) has a similar structure.

Yes, it means we work with three arrays instead of one. But we shouldn't necessarily be putting more pressure on the garbage collector if we always transform in place. Most importantly, I believe the `[minCoord, maxCoord]` structure better conforms to [PLA](http://en.wikipedia.org/wiki/Principle_of_least_astonishment) than `[minX, maxX, minY, maxY, ..., minN, maxN]`.