Esempio n. 1
0
    public void TestAsQuaternion()
    {
        var twist      = new Twist(0.4f);
        var swing      = new Swing(0.2f, 0.3f);
        var twistSwing = new TwistSwing(twist, swing);

        MathAssert.AreEqual(
            twist.AsQuaternion(CartesianAxis.X).Chain(swing.AsQuaternion(CartesianAxis.X)),
            twistSwing.AsQuaternion(CartesianAxis.X),
            Acc);

        MathAssert.AreEqual(
            twist.AsQuaternion(CartesianAxis.X).Chain(swing.AsQuaternion(CartesianAxis.X)),
            twistSwing.AsQuaternion(CartesianAxis.X),
            Acc);

        MathAssert.AreEqual(
            twist.AsQuaternion(CartesianAxis.X).Chain(swing.AsQuaternion(CartesianAxis.X)),
            twistSwing.AsQuaternion(CartesianAxis.X),
            Acc);

        MathAssert.AreEqual(
            twist.AsQuaternion(CartesianAxis.X).Chain(swing.AsQuaternion(CartesianAxis.X)),
            twistSwing.AsQuaternion(CartesianAxis.X),
            Acc);
    }