public void Matrix3x2LerpTest() { Matrix3x2 a = new Matrix3x2(); a.M11 = 11.0f; a.M12 = 12.0f; a.M21 = 21.0f; a.M22 = 22.0f; a.M31 = 31.0f; a.M32 = 32.0f; Matrix3x2 b = GenerateIncrementalMatrixNumber(); float t = 0.5f; Matrix3x2 expected = new Matrix3x2(); expected.M11 = a.M11 + (b.M11 - a.M11) * t; expected.M12 = a.M12 + (b.M12 - a.M12) * t; expected.M21 = a.M21 + (b.M21 - a.M21) * t; expected.M22 = a.M22 + (b.M22 - a.M22) * t; expected.M31 = a.M31 + (b.M31 - a.M31) * t; expected.M32 = a.M32 + (b.M32 - a.M32) * t; Matrix3x2 actual; actual = Matrix3x2.Lerp(a, b, t); Assert.True(MathHelper.Equal(expected, actual), "Matrix3x2.Lerp did not return the expected value."); }
public static Matrix3x2 LerpTo(this Matrix3x2 matrix, Matrix3x2 target, float percent) { return(Matrix3x2.Lerp(matrix, target, percent)); }
public static Matrix3x2 Lerp(this Matrix3x2 first, Matrix3x2 second, Single amount) { return(Matrix3x2.Lerp(first, second, amount)); }