Example #1
0
        public static matrix3x3 mul(matrix3x3 left, matrix3x3 right)
        {
            matrix3x3 ret = new matrix3x3();

            ret.m11 = float3.dot(left.row1(), right.col1()); ret.m12 = float3.dot(left.row1(), right.col2()); ret.m13 = float3.dot(left.row1(), right.col3());
            ret.m21 = float3.dot(left.row2(), right.col1()); ret.m22 = float3.dot(left.row2(), right.col2()); ret.m23 = float3.dot(left.row2(), right.col3());
            ret.m31 = float3.dot(left.row3(), right.col1()); ret.m32 = float3.dot(left.row3(), right.col2()); ret.m33 = float3.dot(left.row3(), right.col3());
            return(ret);
        }
Example #2
0
 public static float3 mul(matrix3x3 left, float3 right)
 {
     return(new float3(
                float3.dot(left.row1(), right),
                float3.dot(left.row2(), right),
                float3.dot(left.row3(), right)));
 }