Esempio n. 1
0
        public void LineToPointDistance2DTest3()
        {
            double[] a = { 0d, 0d };
            double[] b = { 0d, 2d };
            double[] c = { 1d, 1d };
            double[] d = { 2d, 2d };

            var dist1 = MatSimUtils.LineToPointDistance2D(a, b, c);
            var dist2 = MatSimUtils.LineToPointDistance2D(a, b, d);

            Assert.IsTrue(dist1 < dist2);
        }
Esempio n. 2
0
        public void LineToPointDistance2DTest2()
        {
            double[] a = { 0d, 0d };
            double[] b = { 0d, 2d };
            double[] c = { 1d, 1d };

            double expected = 0d;

            double actual = MatSimUtils.LineToPointDistance2D(a, b, c);

            Assert.AreNotEqual(expected, actual);
        }
Esempio n. 3
0
 public double[] GetLatLon()
 {
     return(MatSimUtils.GetLatLon(x, y));
 }
Esempio n. 4
0
 /// <summary>
 /// minx, miny, maxx, maxy.
 /// </summary>
 /// <returns></returns>
 public float[] GetMinMaxXY()
 {
     return(MatSimUtils.GetMinMaxXY(nodes));
 }
Esempio n. 5
0
 double LinkToPointDistance(MatSimLink link, double[] point)
 {
     return(MatSimUtils.LineToPointDistance2D(GetNode(link.from).Point, GetNode(link.to).Point, point));
 }