Abacus.DoublePrecision.Vector3Tests.TestStaticFn_CatmullRom_iv C# (CSharp) Method

TestStaticFn_CatmullRom_iv() private method

private TestStaticFn_CatmullRom_iv ( ) : void
return void
        public void TestStaticFn_CatmullRom_iv ()
        {
            var a = new Vector3( -90, -90, -90 );
            var b = new Vector3( -30, -30, -30 );
            var c = new Vector3( +30, +30, +30 );
            var d = new Vector3( +90, +90, +90 );

            Double one = 1;

            Double a0 = 0;
            Double a1 = (one * 1) / 4;
            Double a2 = (one * 2) / 4;
            Double a3 = (one * 3) / 4;
            Double a4 = 1;

            Vector3 r0 = b;
            Vector3 r1 = new Vector3( -15, -15, -15 );
            Vector3 r2 = Vector3.Zero;
            Vector3 r3 = new Vector3(  15,  15,  15 );
            Vector3 r4 = c;

            var knownResults = new List<Tuple<Double, Vector3>>
            {
                new Tuple<Double, Vector3>( a0, r0 ),
                new Tuple<Double, Vector3>( a1, r1 ),
                new Tuple<Double, Vector3>( a2, r2 ),
                new Tuple<Double, Vector3>( a3, r3 ),
                new Tuple<Double, Vector3>( a4, r4 ),
            };

            for (Int32 idx = 0; idx < knownResults.Count; ++idx)
            {
                Vector3 result;
                Double amount = knownResults[idx].Item1;
                Vector3 expected = knownResults[idx].Item2;

                Vector3.CatmullRom (
                    ref a, ref b, ref c, ref d, ref amount, out result);

                AssertEqualWithinReason(result, expected);
            }
        }
Vector3Tests