public void TestGeoCoordinateOffsetRandom() { var generator = new OsmSharp.Math.Random.RandomGenerator(10124613); for(int idx = 0; idx < 1000; idx++) { GeoCoordinate start = new GeoCoordinate(51, 4.8); GeoCoordinate offset = start.OffsetRandom(generator, 20); double distance = offset.DistanceReal(start).Value; Assert.IsTrue(distance <= 20.001); } }
public void TestGeoCoordinateOffsetRandom() { var generator = new OsmSharp.Math.Random.RandomGenerator(10124613); for (int idx = 0; idx < 1000; idx++) { GeoCoordinate start = new GeoCoordinate(51, 4.8); GeoCoordinate offset = start.OffsetRandom(generator, 20); double distance = offset.DistanceReal(start).Value; Assert.IsTrue(distance <= 20.001); } }