Esempio n. 1
0
        public static void InverseTest()
        {
            TrafoTesting.GenericTest(rnd =>
            {
                var s = TrafoTesting.GetRandomScale3(rnd);

                var p = rnd.UniformV3d() * rnd.UniformInt(1000);
                var q = s.Transform(p);

                // Inverse property
                var res = s.Inverse.Transform(q);

                // InvTransform
                var res2 = s.InvTransform(q);

                // Invert method
                Scale.Invert(ref s);
                var res3 = s.Transform(q);

                TrafoTesting.AreEqual(p, res);
                TrafoTesting.AreEqual(p, res2);
                TrafoTesting.AreEqual(p, res3);
            });
        }