예제 #1
0
        public void TestMethod(float sx, float sz, float sdx, float sdz, int sm, float ex, float ez, float edx, float edz, int em, int r, bool cw, float rx, float rz)
        {
            var result = RoundRoadTools.FoundRound(new NodePoint(sx, sz, sdx, sdz, mode: (Direction)sm), new NodePoint(ex, ez, edx, edz, mode: (Direction)em), r * RoundRoadTools.U, cw);

            Assert.AreEqual(rx, result.RoundCenterPos.x, 0.001);
            Assert.AreEqual(rz, result.RoundCenterPos.y, 0.001);
        }
예제 #2
0
 public void ParallelLinesTestMethod(float sx, float sz, float sdx, float sdz, int sm, float ex, float ez, float edx, float edz, int em, int r, bool cw)
 {
     Assert.ThrowsException <RoadParallelLinesException>(() => RoundRoadTools.FoundRound(new NodePoint(sx, sz, sdx, sdz, mode: (Direction)sm), new NodePoint(ex, ez, edx, edz, mode: (Direction)em), r, cw));
 }