Example #1
0
        public static float test_struct_multiple_fields(float x)
        {
            var v = new TestVector4
            {
                x = 1.0f,
                y = 2.0f,
                z = 3.0f,
                w = 4.0f
            };

            return(x + v.x + v.y + v.z + v.w);
        }
Example #2
0
        public void ScreenFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected)
        {
            Vector4 actual = PorterDuffFunctions.ScreenSrcOver((Vector4)back, source, amount);

            VectorAssert.Equal(expected, actual, 5);
        }
Example #3
0
        public void NormalBlendFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected)
        {
            Vector4 actual = PorterDuffFunctions.NormalSrcOver((Vector4)back, source, amount);

            Assert.Equal(expected, actual);
        }
Example #4
0
        public void SubstractFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected)
        {
            Vector4 actual = PorterDuffFunctions.Subtract((Vector4)back, source, amount);

            VectorAssert.Equal(expected, actual, 5);
        }
Example #5
0
        public void AddFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected)
        {
            Vector4 actual = PorterDuffFunctions.Multiply((Vector4)back, source, amount);

            VectorAssert.Equal(expected, actual, 5);
        }
Example #6
0
        public void HardLightFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected)
        {
            Vector4 actual = PorterDuffFunctions.HardLightFunction(back, source, amount);

            VectorAssert.Equal(expected, actual, 5);
        }