示例#1
0
        public void Exp4()
        {
            float    θ = 0.0f;
            Vector3F v = new Vector3F(1.0f, 2.0f, 3.0f);

            v.Normalize();

            QuaternionF q = new QuaternionF(0.0f, θ * v);

            q.Exp();
            Assert.IsTrue(Numeric.AreEqual(1, q.W));
            Assert.IsTrue(Vector3F.AreNumericallyEqual(Vector3F.Zero, q.V));
        }
示例#2
0
        public void Exp2()
        {
            float    θ = -0.3f;
            Vector3F v = new Vector3F(1.0f, 2.0f, 3.0f);

            v.Normalize();

            QuaternionF q = new QuaternionF(0.0f, θ * v);

            q.Exp();
            Assert.IsTrue(Numeric.AreEqual((float)Math.Cos(θ), q.W));
            Assert.IsTrue(Vector3F.AreNumericallyEqual((float)Math.Sin(θ) * v, q.V));
        }
示例#3
0
        public void Exp4()
        {
            float θ = 0.0f;
              Vector3F v = new Vector3F(1.0f, 2.0f, 3.0f);
              v.Normalize();

              QuaternionF q = new QuaternionF(0.0f, θ * v);
              q.Exp();
              Assert.IsTrue(Numeric.AreEqual(1, q.W));
              Assert.IsTrue(Vector3F.AreNumericallyEqual(Vector3F.Zero, q.V));
        }
示例#4
0
        public void Exp2()
        {
            float θ = -0.3f;
              Vector3F v = new Vector3F(1.0f, 2.0f, 3.0f);
              v.Normalize();

              QuaternionF q = new QuaternionF(0.0f, θ * v);
              q.Exp();
              Assert.IsTrue(Numeric.AreEqual((float)Math.Cos(θ), q.W));
              Assert.IsTrue(Vector3F.AreNumericallyEqual((float)Math.Sin(θ) * v, q.V));
        }