wmde/ValueView — pull request #126 by thiemowmde (2014-11-04 15:19:26+00:00)
Title: Round coordinate precision to 6 decimal places

We still have code that uses a constant (`0.0000001`) to check if a precision is known (see globeCoordinate.Formatter). The code in this pull request uses `toPrecision` instead (which is fine, I even reviewed and merged this, I think). This works perfectly fine for all precisions except for 1 / 60 which is rounded to 0.01667. `( 1 / 60 ).toPrecision( 4 ) - 1 / 60 < 0.0000001` is false but with `toPrecision( 6 )` it's true.

I hope this does not break other things. @adrianlang?

```js
[ 10, 1, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001,
1 / 60, 1 / 3600, 1 / 36000, 1 / 360000, 1 / 3600000 ].map( function( a ) {
return a.toPrecision( 4 ) - a < 0.0000001 ? 'ok' : a;
} ).join( ', ' )
```

[Bug 64820](https://bugzilla.wikimedia.org/show_bug.cgi?id=64820)