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); }
public void ScreenFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.ScreenSrcOver((Vector4)back, source, amount); VectorAssert.Equal(expected, actual, 5); }
public void NormalBlendFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.NormalSrcOver((Vector4)back, source, amount); Assert.Equal(expected, actual); }
public void SubstractFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.Subtract((Vector4)back, source, amount); VectorAssert.Equal(expected, actual, 5); }
public void AddFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.Multiply((Vector4)back, source, amount); VectorAssert.Equal(expected, actual, 5); }
public void HardLightFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.HardLightFunction(back, source, amount); VectorAssert.Equal(expected, actual, 5); }