Ejemplo n.º 1
0
        public void Vector3HalfTest()
        {
            int     size  = sizeof(float) * 4 * 3;
            Vector3 value = new Vector3(rnd.NextSmallFloat(), rnd.NextSmallFloat(), rnd.NextSmallFloat());

            stream.WriteVector3Half(value);

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

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