BEPUutilities.Matrix3x3.Add C# (CSharp) Method

Add() public static method

Adds the two matrices together on a per-element basis.
public static Add ( Matrix &a, Matrix &b, Matrix3x3 &result ) : void
a Matrix First matrix to add.
b Matrix Second matrix to add.
result Matrix3x3 Sum of the two matrices.
return void
        public static void Add(ref Matrix a, ref Matrix b, out Matrix3x3 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;

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

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

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

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

Same methods

Matrix3x3::Add ( Matrix &a, Matrix3x3 &b, Matrix3x3 &result ) : void
Matrix3x3::Add ( Matrix3x3 &a, Matrix &b, Matrix3x3 &result ) : void
Matrix3x3::Add ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void