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); }
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); }
public double[] GetLatLon() { return(MatSimUtils.GetLatLon(x, y)); }
/// <summary> /// minx, miny, maxx, maxy. /// </summary> /// <returns></returns> public float[] GetMinMaxXY() { return(MatSimUtils.GetMinMaxXY(nodes)); }
double LinkToPointDistance(MatSimLink link, double[] point) { return(MatSimUtils.LineToPointDistance2D(GetNode(link.from).Point, GetNode(link.to).Point, point)); }