elasticsearch/elasticsearch — pull request #1602 by ofavre (2012-01-10 16:28:41+00:00)
Title: Improve latitude and longitude normalization

The current latitude and longitude normalization code seems to work fine, and surely will in most situations.
However it won't behave correctly in some corner cases and more importantly can result in infinite loop with infinite values.

My proposition is based on the modulus operator used with floating point values.
Note that it should not be significantly faster or slower in normal cases.

See [this commit comment](https://github.com/elasticsearch/elasticsearch/commit/779dc4309bfb03fe0f1335d5c9e3b06e802ebc70#commitcomment-853482) for more.