Beispiel #1
0
        public void Angle_SamePlane_ReturnAngle()
        {
            PlanePoint   p1     = new PlanePoint(3);
            Vector       n1     = new Vector(new double[] { 1, 0, 0 });
            Hyperplane   h1     = new Hyperplane(p1, n1);
            const double expect = 0;

            double result = h1.Angle(h1);

            Assert.AreEqual(expect, result, Tools.Eps);
        }
Beispiel #2
0
        public void Angle_WhenCall_ReturnAngle()
        {
            PlanePoint   p1     = new PlanePoint(3);
            Vector       n1     = new Vector(new double[] { 1, 0, 0 });
            Vector       n2     = new Vector(new double[] { 0, 1, 0 });
            Hyperplane   h1     = new Hyperplane(p1, n1);
            Hyperplane   h2     = new Hyperplane(p1, n2);
            const double expect = Math.PI / 2;

            double result = h1.Angle(h2);

            Assert.AreEqual(expect, result, Tools.Eps);
        }