BEPUutilities.Matrix2x3.Add C# (CSharp) Method

Add() public static method

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

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

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

            result.M21 = m21;
            result.M22 = m22;
            result.M23 = m23;
        }