summaryrefslogtreecommitdiff
path: root/jstests/core/geo_circle1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/geo_circle1.js')
-rw-r--r--jstests/core/geo_circle1.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/core/geo_circle1.js b/jstests/core/geo_circle1.js
index a679a408b32..c5b6841b9a8 100644
--- a/jstests/core/geo_circle1.js
+++ b/jstests/core/geo_circle1.js
@@ -2,7 +2,12 @@
t = db.geo_circle1;
t.drop();
-searches = [[[5, 5], 3], [[5, 5], 1], [[5, 5], 5], [[0, 5], 5], ];
+searches = [
+ [[5, 5], 3],
+ [[5, 5], 1],
+ [[5, 5], 5],
+ [[0, 5], 5],
+];
correct = searches.map(function(z) {
return [];
});
@@ -11,10 +16,7 @@ num = 0;
for (x = 0; x <= 20; x++) {
for (y = 0; y <= 20; y++) {
- o = {
- _id: num++,
- loc: [x, y]
- };
+ o = {_id: num++, loc: [x, y]};
t.save(o);
for (i = 0; i < searches.length; i++)
if (Geo.distance([x, y], searches[i][0]) <= searches[i][1])
@@ -26,9 +28,7 @@ t.ensureIndex({loc: "2d"});
for (i = 0; i < searches.length; i++) {
// print( tojson( searches[i] ) + "\t" + correct[i].length )
- q = {
- loc: {$within: {$center: searches[i]}}
- };
+ q = {loc: {$within: {$center: searches[i]}}};
// correct[i].forEach( printjson )
// printjson( q );