Exemplo n.º 1
0
        public void QuaternionHalfTest()
        {
            int        size  = sizeof(float) * 4 * 4;
            Quaternion value = new Quaternion(rnd.NextSmallFloat(), rnd.NextSmallFloat(), rnd.NextSmallFloat(), rnd.NextSmallFloat());

            stream.WriteQuaternionHalf(value);

            Assert.AreEqual(size, stream.BitOffset);
            stream.ResetRead();

            AreSimilar(value, stream.ReadQuaternionHalf(), 0.001f);
            Assert.AreEqual(size, stream.BitOffset);
        }