예제 #1
0
        public static void FirstStarExample()
        {
            string[] input =
            {
                "p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0>",
                "p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>"
            };

            var result = Particles.ClosestToOrigo(input);

            Assert.Equal(0, result);
        }
예제 #2
0
        public static void FirstStarExample2()
        {
            string[] input =
            {
                "p=<-6,0,0>, v=< 3,0,0>, a=< 0,0,0>",
                "p=<-4,0,0>, v=< 2,0,0>, a=< 0,0,0>",
                "p=<-2,0,0>, v=< 1,0,0>, a=< 0,0,0>",
                "p=< 3,0,0>, v=<-1,0,0>, a=< 0,0,0>"
            };

            var result = Particles.LeftAfterCollisions(input);

            Assert.Equal(1, result);
        }