﻿Matrix4x4 Operators

The Matrix4x4 type exposes the following members.

# Operators

NameDescription
value + matrix, adds a value to all matrix components
matrix + value, adds a value to all matrix components
matrix + matrix, adds the values of two matrices component wise
Division(Double, Matrix4x4)
value / matrix, divides a value by all matrix components
Division(Matrix4x4, Double)
matrix / value, divides all matrix components with a value
Equality
Inequality
LogicalNot
! matrix, calculates the inverse of the matrix optimized 4x4 matrix inversion using cramer's rule, found in the game engine http://www.ogre3d.org takes about 1,8ns to execute on intel core2 duo 2Ghz, the intel reference implementation (not assembly optimized) was about 2,2ns. http://www.intel.com/design/pentiumiii/sml/24504301.pdf
Multiply(Double, Matrix4x4)
value * matrix, multiplies all matrix components with a value
Multiply(Matrix4x4, Double)
matrix * value, multiplies all matrix components with a value
Multiply(Matrix4x4, Matrix4x4)
matrix * matrix, performs a matrix multiplication
Multiply(Matrix4x4, Vector2D)
matrix * 2d vector, applies a matrix transform to a 2d-vector, (x, y, 0, 1)
Multiply(Matrix4x4, Vector3D)
matrix * 3d vector, applies a matrix transform to a 3d-vector, (x, y, z, 1) and divides by w
Multiply(Matrix4x4, Vector4D)
matrix * 4d vector, applies a matrix transform to a 4d-vector
OnesComplement
~ matrix, calculates the determinant of the matrix
Subtraction(Double, Matrix4x4)
value - matrix, subtracts all matrix components from a value
Subtraction(Matrix4x4, Double)
matrix - value, subtracts a value from all matrix components
Subtraction(Matrix4x4, Matrix4x4)
matrix - matrix, subtracts the components of B from the components of A
UnaryNegation
- matrix, flips the sign off all matrix components
UnaryPlus
+ matrix, makes no changes to a matrix