コード例 #1
0
ファイル: Mat2x4.cs プロジェクト: ByteDecoder/ultraviolet
        /// <summary>
        /// Transposes the specified matrix.
        /// </summary>
        /// <param name="matrix">The <see cref="Mat2x4"/> to transpose.</param>
        /// <param name="result">The transposed <see cref="Mat4x2"/>.</param>
        public static void Transpose(ref Mat2x4 matrix, out Mat4x2 result)
        {
            Mat4x2 temp;

            temp.M11 = matrix.M11;
            temp.M12 = matrix.M21;
            temp.M13 = matrix.M31;
            temp.M14 = matrix.M41;

            temp.M21 = matrix.M12;
            temp.M22 = matrix.M22;
            temp.M23 = matrix.M32;
            temp.M24 = matrix.M42;

            result = temp;
        }
コード例 #2
0
ファイル: Mat4x2.cs プロジェクト: ByteDecoder/ultraviolet
        /// <summary>
        /// Transposes the specified matrix.
        /// </summary>
        /// <param name="matrix">The <see cref="Mat4x2"/> to transpose.</param>
        /// <param name="result">The transposed <see cref="Mat2x4"/>.</param>
        public static void Transpose(ref Mat4x2 matrix, out Mat2x4 result)
        {
            Mat2x4 temp;

            temp.M11 = matrix.M11;
            temp.M12 = matrix.M21;

            temp.M21 = matrix.M12;
            temp.M22 = matrix.M22;

            temp.M31 = matrix.M13;
            temp.M32 = matrix.M23;

            temp.M41 = matrix.M14;
            temp.M42 = matrix.M24;

            result = temp;
        }