0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

Limit generated points to [-179.9, 179.9] due to SERVER-1720

This commit is contained in:
Mathias Stearn 2010-09-03 13:16:25 -04:00
parent d1efe8cafc
commit b5e57bae31

View File

@ -13,7 +13,7 @@ GeoNearRandomTest = function(name) {
GeoNearRandomTest.prototype.mkPt = function mkPt(scale){ GeoNearRandomTest.prototype.mkPt = function mkPt(scale){
scale = scale || 1; // scale is good for staying away from edges scale = scale || 1; // scale is good for staying away from edges
return [((Random.rand() * 360) - 180) * scale, ((Random.rand() * 180) - 90) * scale]; return [((Random.rand() * 359.8) - 179.9) * scale, ((Random.rand() * 180) - 90) * scale];
} }
GeoNearRandomTest.prototype.insertPts = function(nPts) { GeoNearRandomTest.prototype.insertPts = function(nPts) {