BEPUutilities.Matrix3x2.Add C# (CSharp) Method

Add() public static method

Adds the two matrices together on a per-element basis.
public static Add ( Matrix3x2 &a, Matrix3x2 &b, Matrix3x2 &result ) : void
a Matrix3x2 First matrix to add.
b Matrix3x2 Second matrix to add.
result Matrix3x2 Sum of the two matrices.
return void
        public static void Add(ref Matrix3x2 a, ref Matrix3x2 b, out Matrix3x2 result)
        {
            float m11 = a.M11 + b.M11;
            float m12 = a.M12 + b.M12;

            float m21 = a.M21 + b.M21;
            float m22 = a.M22 + b.M22;

            float m31 = a.M31 + b.M31;
            float m32 = a.M32 + b.M32;

            result.M11 = m11;
            result.M12 = m12;

            result.M21 = m21;
            result.M22 = m22;

            result.M31 = m31;
            result.M32 = m32;
        }