WithinCircle() public static method

Tests that the value of the named element is within a circle (see $within and $center).
public static WithinCircle ( string name, double centerX, double centerY, double radius ) : QueryConditionList
name string The name of the element to test.
centerX double The x coordinate of the origin.
centerY double The y coordinate of the origin.
radius double The radius of the circle.
return QueryConditionList
コード例 #1
0
        public void TestWithinCircleSpherical()
        {
            var query    = Query.WithinCircle("loc", 1.1, 2.2, 3.3, true);
            var expected = "{ 'loc' : { '$within' : { '$centerSphere' : [[1.1, 2.2], 3.3] } } }".Replace("'", "\"");

            Assert.AreEqual(expected, query.ToJson());
        }