Ejemplo n.º 1
0
    public void Lerp()
    {
        for (int i = 0; i < count; i++)
        {
            Quaternion  a  = new Quaternion();
            Quaternion  b  = new Quaternion();
            Quaterniond ad = new Quaterniond();
            Quaterniond bd = new Quaterniond();

            RandomQuaternion(ref a, ref ad);
            RandomQuaternion(ref b, ref bd);

            float p = UnityEngine.Random.Range(-2F, 2F);

            Quaternion  value  = Quaternion.Lerp(a, b, p);
            Quaterniond valued = Quaterniond.Lerp(ad, bd, p);

            Assert.True(Approximate(value, valued));
        }
    }