Show / Hide Table of Contents

Class MatrixD

Defines a matrix.

Inheritance
System.Object
MatrixD
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public sealed class MatrixD : ValueType, IEquatable<MatrixD>

Constructors

MatrixD(Double, Double, Double, Double, Double, Double, Double, Double, Double)

Initializes a new instance of Matrix with rotation data

Declaration
public MatrixD(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
Parameters
Type Name Description
System.Double m11

Value to initialize m11 to.

System.Double m12

Value to initialize m12 to.

System.Double m13

Value to initialize m13 to.

System.Double m21

Value to initialize m21 to.

System.Double m22

Value to initialize m22 to.

System.Double m23

Value to initialize m23 to.

System.Double m31

Value to initialize m31 to.

System.Double m32

Value to initialize m32 to.

System.Double m33

Value to initialize m33 to.

MatrixD(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double)

Initializes a new instance of Matrix.

Declaration
public MatrixD(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)
Parameters
Type Name Description
System.Double m11

Value to initialize m11 to.

System.Double m12

Value to initialize m12 to.

System.Double m13

Value to initialize m13 to.

System.Double m14

Value to initialize m14 to.

System.Double m21

Value to initialize m21 to.

System.Double m22

Value to initialize m22 to.

System.Double m23

Value to initialize m23 to.

System.Double m24

Value to initialize m24 to.

System.Double m31

Value to initialize m31 to.

System.Double m32

Value to initialize m32 to.

System.Double m33

Value to initialize m33 to.

System.Double m34

Value to initialize m34 to.

System.Double m41

Value to initialize m41 to.

System.Double m42

Value to initialize m42 to.

System.Double m43

Value to initialize m43 to.

System.Double m44

Value to initialize m44 to.

MatrixD(Matrix)

Declaration
public MatrixD(Matrix m)
Parameters
Type Name Description
Matrix m

Fields

Identity

Declaration
public static MatrixD Identity
Field Value
Type Description
MatrixD

M11

Value at row 1 column 1 of the matrix.

Declaration
public double M11
Field Value
Type Description
System.Double

M12

Value at row 1 column 2 of the matrix.

Declaration
public double M12
Field Value
Type Description
System.Double

M13

Value at row 1 column 3 of the matrix.

Declaration
public double M13
Field Value
Type Description
System.Double

M14

Value at row 1 column 4 of the matrix.

Declaration
public double M14
Field Value
Type Description
System.Double

M21

Value at row 2 column 1 of the matrix.

Declaration
public double M21
Field Value
Type Description
System.Double

M22

Value at row 2 column 2 of the matrix.

Declaration
public double M22
Field Value
Type Description
System.Double

M23

Value at row 2 column 3 of the matrix.

Declaration
public double M23
Field Value
Type Description
System.Double

M24

Value at row 2 column 4 of the matrix.

Declaration
public double M24
Field Value
Type Description
System.Double

M31

Value at row 3 column 1 of the matrix.

Declaration
public double M31
Field Value
Type Description
System.Double

M32

Value at row 3 column 2 of the matrix.

Declaration
public double M32
Field Value
Type Description
System.Double

M33

Value at row 3 column 3 of the matrix.

Declaration
public double M33
Field Value
Type Description
System.Double

M34

Value at row 3 column 4 of the matrix.

Declaration
public double M34
Field Value
Type Description
System.Double

M41

Value at row 4 column 1 of the matrix.

Declaration
public double M41
Field Value
Type Description
System.Double

M42

Value at row 4 column 2 of the matrix.

Declaration
public double M42
Field Value
Type Description
System.Double

M43

Value at row 4 column 3 of the matrix.

Declaration
public double M43
Field Value
Type Description
System.Double

M44

Value at row 4 column 4 of the matrix.

Declaration
public double M44
Field Value
Type Description
System.Double

Zero

Declaration
public static MatrixD Zero
Field Value
Type Description
MatrixD

Properties

Backward

Gets and sets the backward vector of the Matrix.

Declaration
public Vector3D Backward { get; set; }
Property Value
Type Description
Vector3D

Col0

Declaration
public Vector3D Col0 { get; }
Property Value
Type Description
Vector3D

Col1

Declaration
public Vector3D Col1 { get; }
Property Value
Type Description
Vector3D

Col2

Declaration
public Vector3D Col2 { get; }
Property Value
Type Description
Vector3D

Down

Gets and sets the down vector of the Matrix.

Declaration
public Vector3D Down { get; set; }
Property Value
Type Description
Vector3D

Forward

Gets and sets the forward vector of the Matrix.

Declaration
public Vector3D Forward { get; set; }
Property Value
Type Description
Vector3D

Item[Int32, Int32]

Declaration
public double this[int row, int column] { get; set; }
Parameters
Type Name Description
System.Int32 row
System.Int32 column
Property Value
Type Description
System.Double

Left

Gets and sets the left vector of the Matrix.

Declaration
public Vector3D Left { get; set; }
Property Value
Type Description
Vector3D

Right

Gets and sets the right vector of the Matrix.

Declaration
public Vector3D Right { get; set; }
Property Value
Type Description
Vector3D

Rotation

Declaration
public Matrix3x3 Rotation { get; }
Property Value
Type Description
Matrix3x3

Scale

Declaration
public Vector3D Scale { get; }
Property Value
Type Description
Vector3D

Translation

Gets and sets the translation vector of the Matrix.

Declaration
public Vector3D Translation { get; set; }
Property Value
Type Description
Vector3D

Up

Gets and sets the up vector of the Matrix.

Declaration
public Vector3D Up { get; set; }
Property Value
Type Description
Vector3D

Methods

Add(MatrixD, MatrixD)

Adds a matrix to another matrix.

Declaration
public static MatrixD Add(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

Add(ref MatrixD, ref MatrixD, out MatrixD)

Adds a matrix to another matrix.

Declaration
public static void Add(ref MatrixD matrix1, ref MatrixD matrix2, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

MatrixD result

[OutAttribute] Resulting matrix.

AlignRotationToAxes(ref MatrixD, ref MatrixD)

Declaration
public static MatrixD AlignRotationToAxes(ref MatrixD toAlign, ref MatrixD axisDefinitionMatrix)
Parameters
Type Name Description
MatrixD toAlign
MatrixD axisDefinitionMatrix
Returns
Type Description
MatrixD

AssertIsValid(String)

Declaration
public void AssertIsValid(string message = null)
Parameters
Type Name Description
System.String message

CreateBillboard(Vector3D, Vector3D, Vector3D, Nullable<Vector3D>)

Creates a spherical billboard that rotates around a specified object position.

Declaration
public static MatrixD CreateBillboard(Vector3D objectPosition, Vector3D cameraPosition, Vector3D cameraUpVector, Nullable<Vector3D> cameraForwardVector)
Parameters
Type Name Description
Vector3D objectPosition

Position of the object the billboard will rotate around.

Vector3D cameraPosition

Position of the camera.

Vector3D cameraUpVector

The up vector of the camera.

System.Nullable<Vector3D> cameraForwardVector

Optional forward vector of the camera.

Returns
Type Description
MatrixD

CreateBillboard(ref Vector3D, ref Vector3D, ref Vector3D, Nullable<Vector3D>, out MatrixD)

Creates a spherical billboard that rotates around a specified object position.

Declaration
public static void CreateBillboard(ref Vector3D objectPosition, ref Vector3D cameraPosition, ref Vector3D cameraUpVector, Nullable<Vector3D> cameraForwardVector, out MatrixD result)
Parameters
Type Name Description
Vector3D objectPosition

Position of the object the billboard will rotate around.

Vector3D cameraPosition

Position of the camera.

Vector3D cameraUpVector

The up vector of the camera.

System.Nullable<Vector3D> cameraForwardVector

Optional forward vector of the camera.

MatrixD result

[OutAttribute] The created billboard matrix.

CreateConstrainedBillboard(Vector3D, Vector3D, Vector3D, Nullable<Vector3D>, Nullable<Vector3D>)

Creates a cylindrical billboard that rotates around a specified axis.

Declaration
public static MatrixD CreateConstrainedBillboard(Vector3D objectPosition, Vector3D cameraPosition, Vector3D rotateAxis, Nullable<Vector3D> cameraForwardVector, Nullable<Vector3D> objectForwardVector)
Parameters
Type Name Description
Vector3D objectPosition

Position of the object the billboard will rotate around.

Vector3D cameraPosition

Position of the camera.

Vector3D rotateAxis

Axis to rotate the billboard around.

System.Nullable<Vector3D> cameraForwardVector

Optional forward vector of the camera.

System.Nullable<Vector3D> objectForwardVector

Optional forward vector of the object.

Returns
Type Description
MatrixD

CreateConstrainedBillboard(ref Vector3D, ref Vector3D, ref Vector3D, Nullable<Vector3D>, Nullable<Vector3D>, out MatrixD)

Creates a cylindrical billboard that rotates around a specified axis.

Declaration
public static void CreateConstrainedBillboard(ref Vector3D objectPosition, ref Vector3D cameraPosition, ref Vector3D rotateAxis, Nullable<Vector3D> cameraForwardVector, Nullable<Vector3D> objectForwardVector, out MatrixD result)
Parameters
Type Name Description
Vector3D objectPosition

Position of the object the billboard will rotate around.

Vector3D cameraPosition

Position of the camera.

Vector3D rotateAxis

Axis to rotate the billboard around.

System.Nullable<Vector3D> cameraForwardVector

Optional forward vector of the camera.

System.Nullable<Vector3D> objectForwardVector

Optional forward vector of the object.

MatrixD result

[OutAttribute] The created billboard matrix.

CreateFromAxisAngle(Vector3D, Double)

Creates a new Matrix that rotates around an arbitrary vector.

Declaration
public static MatrixD CreateFromAxisAngle(Vector3D axis, double angle)
Parameters
Type Name Description
Vector3D axis

The axis to rotate around.

System.Double angle

The angle to rotate around the vector.

Returns
Type Description
MatrixD

CreateFromAxisAngle(ref Vector3D, Double, out MatrixD)

Creates a new Matrix that rotates around an arbitrary vector.

Declaration
public static void CreateFromAxisAngle(ref Vector3D axis, double angle, out MatrixD result)
Parameters
Type Name Description
Vector3D axis

The axis to rotate around.

System.Double angle

The angle to rotate around the vector.

MatrixD result

[OutAttribute] The created Matrix.

CreateFromDir(Vector3D)

Declaration
public static MatrixD CreateFromDir(Vector3D dir)
Parameters
Type Name Description
Vector3D dir
Returns
Type Description
MatrixD

CreateFromDir(Vector3D, Vector3D)

Declaration
public static MatrixD CreateFromDir(Vector3D dir, Vector3D suggestedUp)
Parameters
Type Name Description
Vector3D dir
Vector3D suggestedUp
Returns
Type Description
MatrixD

CreateFromQuaternion(Quaternion)

Creates a rotation Matrix from a Quaternion.

Declaration
public static MatrixD CreateFromQuaternion(Quaternion quaternion)
Parameters
Type Name Description
Quaternion quaternion

Quaternion to create the Matrix from.

Returns
Type Description
MatrixD

CreateFromQuaternion(ref Quaternion, out MatrixD)

Creates a rotation Matrix from a Quaternion.

Declaration
public static void CreateFromQuaternion(ref Quaternion quaternion, out MatrixD result)
Parameters
Type Name Description
Quaternion quaternion

Quaternion to create the Matrix from.

MatrixD result

[OutAttribute] The created Matrix.

CreateFromQuaternion(QuaternionD)

Declaration
public static MatrixD CreateFromQuaternion(QuaternionD quaternion)
Parameters
Type Name Description
QuaternionD quaternion
Returns
Type Description
MatrixD

CreateFromTransformScale(Quaternion, Vector3D, Vector3D)

Declaration
public static MatrixD CreateFromTransformScale(Quaternion orientation, Vector3D position, Vector3D scale)
Parameters
Type Name Description
Quaternion orientation
Vector3D position
Vector3D scale
Returns
Type Description
MatrixD

CreateFromYawPitchRoll(Double, Double, Double)

Creates a new rotation matrix from a specified yaw, pitch, and roll.

Declaration
public static MatrixD CreateFromYawPitchRoll(double yaw, double pitch, double roll)
Parameters
Type Name Description
System.Double yaw

Angle of rotation, in radians, around the y-axis.

System.Double pitch

Angle of rotation, in radians, around the x-axis.

System.Double roll

Angle of rotation, in radians, around the z-axis.

Returns
Type Description
MatrixD

CreateFromYawPitchRoll(Double, Double, Double, out MatrixD)

Fills in a rotation matrix from a specified yaw, pitch, and roll.

Declaration
public static void CreateFromYawPitchRoll(double yaw, double pitch, double roll, out MatrixD result)
Parameters
Type Name Description
System.Double yaw

Angle of rotation, in radians, around the y-axis.

System.Double pitch

Angle of rotation, in radians, around the x-axis.

System.Double roll

Angle of rotation, in radians, around the z-axis.

MatrixD result

[OutAttribute] An existing matrix filled in to represent the specified yaw, pitch, and roll.

CreateLookAt(Vector3D, Vector3D, Vector3)

Declaration
public static MatrixD CreateLookAt(Vector3D cameraPosition, Vector3D cameraTarget, Vector3 cameraUpVector)
Parameters
Type Name Description
Vector3D cameraPosition
Vector3D cameraTarget
Vector3 cameraUpVector
Returns
Type Description
MatrixD

CreateLookAt(Vector3D, Vector3D, Vector3D)

Creates a view matrix.

Declaration
public static MatrixD CreateLookAt(Vector3D cameraPosition, Vector3D cameraTarget, Vector3D cameraUpVector)
Parameters
Type Name Description
Vector3D cameraPosition

The position of the camera.

Vector3D cameraTarget

The target towards which the camera is pointing.

Vector3D cameraUpVector

The direction that is "up" from the camera's point of view.

Returns
Type Description
MatrixD

CreateLookAt(ref Vector3D, ref Vector3D, ref Vector3D, out MatrixD)

Creates a view matrix.

Declaration
public static void CreateLookAt(ref Vector3D cameraPosition, ref Vector3D cameraTarget, ref Vector3D cameraUpVector, out MatrixD result)
Parameters
Type Name Description
Vector3D cameraPosition

The position of the camera.

Vector3D cameraTarget

The target towards which the camera is pointing.

Vector3D cameraUpVector

The direction that is "up" from the camera's point of view.

MatrixD result

[OutAttribute] The created view matrix.

CreateLookAtInverse(Vector3D, Vector3D, Vector3D)

Declaration
public static MatrixD CreateLookAtInverse(Vector3D cameraPosition, Vector3D cameraTarget, Vector3D cameraUpVector)
Parameters
Type Name Description
Vector3D cameraPosition
Vector3D cameraTarget
Vector3D cameraUpVector
Returns
Type Description
MatrixD

CreateOrthographic(Double, Double, Double, Double)

Builds an orthogonal projection matrix.

Declaration
public static MatrixD CreateOrthographic(double width, double height, double zNearPlane, double zFarPlane)
Parameters
Type Name Description
System.Double width

Width of the view volume.

System.Double height

Height of the view volume.

System.Double zNearPlane

Minimum z-value of the view volume.

System.Double zFarPlane

Maximum z-value of the view volume.

Returns
Type Description
MatrixD

CreateOrthographic(Double, Double, Double, Double, out MatrixD)

Builds an orthogonal projection matrix.

Declaration
public static void CreateOrthographic(double width, double height, double zNearPlane, double zFarPlane, out MatrixD result)
Parameters
Type Name Description
System.Double width

Width of the view volume.

System.Double height

Height of the view volume.

System.Double zNearPlane

Minimum z-value of the view volume.

System.Double zFarPlane

Maximum z-value of the view volume.

MatrixD result

[OutAttribute] The projection matrix.

CreateOrthographicOffCenter(Double, Double, Double, Double, Double, Double)

Builds a customized, orthogonal projection matrix.

Declaration
public static MatrixD CreateOrthographicOffCenter(double left, double right, double bottom, double top, double zNearPlane, double zFarPlane)
Parameters
Type Name Description
System.Double left

Minimum x-value of the view volume.

System.Double right

Maximum x-value of the view volume.

System.Double bottom

Minimum y-value of the view volume.

System.Double top

Maximum y-value of the view volume.

System.Double zNearPlane

Minimum z-value of the view volume.

System.Double zFarPlane

Maximum z-value of the view volume.

Returns
Type Description
MatrixD

CreateOrthographicOffCenter(Double, Double, Double, Double, Double, Double, out MatrixD)

Builds a customized, orthogonal projection matrix.

Declaration
public static void CreateOrthographicOffCenter(double left, double right, double bottom, double top, double zNearPlane, double zFarPlane, out MatrixD result)
Parameters
Type Name Description
System.Double left

Minimum x-value of the view volume.

System.Double right

Maximum x-value of the view volume.

System.Double bottom

Minimum y-value of the view volume.

System.Double top

Maximum y-value of the view volume.

System.Double zNearPlane

Minimum z-value of the view volume.

System.Double zFarPlane

Maximum z-value of the view volume.

MatrixD result

[OutAttribute] The projection matrix.

CreatePerspective(Double, Double, Double, Double)

Builds a perspective projection matrix and returns the result by value.

Declaration
public static MatrixD CreatePerspective(double width, double height, double nearPlaneDistance, double farPlaneDistance)
Parameters
Type Name Description
System.Double width

Width of the view volume at the near view plane.

System.Double height

Height of the view volume at the near view plane.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to the far view plane.

Returns
Type Description
MatrixD

CreatePerspective(Double, Double, Double, Double, out MatrixD)

Builds a perspective projection matrix and returns the result by reference.

Declaration
public static void CreatePerspective(double width, double height, double nearPlaneDistance, double farPlaneDistance, out MatrixD result)
Parameters
Type Name Description
System.Double width

Width of the view volume at the near view plane.

System.Double height

Height of the view volume at the near view plane.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to the far view plane.

MatrixD result

[OutAttribute] The projection matrix.

CreatePerspectiveFieldOfView(Double, Double, Double, Double)

Builds a perspective projection matrix based on a field of view and returns by value.

Declaration
public static MatrixD CreatePerspectiveFieldOfView(double fieldOfView, double aspectRatio, double nearPlaneDistance, double farPlaneDistance)
Parameters
Type Name Description
System.Double fieldOfView

Field of view in the y direction, in radians.

System.Double aspectRatio

Aspect ratio, defined as view space width divided by height. To match the aspect ratio of the viewport, the property AspectRatio.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to the far view plane.

Returns
Type Description
MatrixD

CreatePerspectiveFieldOfView(Double, Double, Double, Double, out MatrixD)

Builds a perspective projection matrix based on a field of view and returns by reference.

Declaration
public static void CreatePerspectiveFieldOfView(double fieldOfView, double aspectRatio, double nearPlaneDistance, double farPlaneDistance, out MatrixD result)
Parameters
Type Name Description
System.Double fieldOfView

Field of view in the y direction, in radians.

System.Double aspectRatio

Aspect ratio, defined as view space width divided by height. To match the aspect ratio of the viewport, the property AspectRatio.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to the far view plane.

MatrixD result

[OutAttribute] The perspective projection matrix.

CreatePerspectiveOffCenter(Double, Double, Double, Double, Double, Double)

Builds a customized, perspective projection matrix.

Declaration
public static MatrixD CreatePerspectiveOffCenter(double left, double right, double bottom, double top, double nearPlaneDistance, double farPlaneDistance)
Parameters
Type Name Description
System.Double left

Minimum x-value of the view volume at the near view plane.

System.Double right

Maximum x-value of the view volume at the near view plane.

System.Double bottom

Minimum y-value of the view volume at the near view plane.

System.Double top

Maximum y-value of the view volume at the near view plane.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to of the far view plane.

Returns
Type Description
MatrixD

CreatePerspectiveOffCenter(Double, Double, Double, Double, Double, Double, out MatrixD)

Builds a customized, perspective projection matrix.

Declaration
public static void CreatePerspectiveOffCenter(double left, double right, double bottom, double top, double nearPlaneDistance, double farPlaneDistance, out MatrixD result)
Parameters
Type Name Description
System.Double left

Minimum x-value of the view volume at the near view plane.

System.Double right

Maximum x-value of the view volume at the near view plane.

System.Double bottom

Minimum y-value of the view volume at the near view plane.

System.Double top

Maximum y-value of the view volume at the near view plane.

System.Double nearPlaneDistance

Distance to the near view plane.

System.Double farPlaneDistance

Distance to of the far view plane.

MatrixD result

[OutAttribute] The created projection matrix.

CreateReflection(Plane)

Creates a Matrix that reflects the coordinate system about a specified Plane.

Declaration
public static MatrixD CreateReflection(Plane value)
Parameters
Type Name Description
Plane value

The Plane about which to create a reflection.

Returns
Type Description
MatrixD

CreateReflection(ref Plane, out MatrixD)

Fills in an existing Matrix so that it reflects the coordinate system about a specified Plane.

Declaration
public static void CreateReflection(ref Plane value, out MatrixD result)
Parameters
Type Name Description
Plane value

The Plane about which to create a reflection.

MatrixD result

[OutAttribute] A Matrix that creates the reflection.

CreateRotationX(Double)

Returns a matrix that can be used to rotate a set of vertices around the x-axis.

Declaration
public static MatrixD CreateRotationX(double radians)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the x-axis. Note that you can use ToRadians to convert degrees to radians.

Returns
Type Description
MatrixD

CreateRotationX(Double, out MatrixD)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the x-axis.

Declaration
public static void CreateRotationX(double radians, out MatrixD result)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the x-axis. Note that you can use ToRadians to convert degrees to radians.

MatrixD result

[OutAttribute] The matrix in which to place the calculated data.

CreateRotationY(Double)

Returns a matrix that can be used to rotate a set of vertices around the y-axis.

Declaration
public static MatrixD CreateRotationY(double radians)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the y-axis. Note that you can use ToRadians to convert degrees to radians.

Returns
Type Description
MatrixD

CreateRotationY(Double, out MatrixD)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the y-axis.

Declaration
public static void CreateRotationY(double radians, out MatrixD result)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the y-axis. Note that you can use ToRadians to convert degrees to radians.

MatrixD result

[OutAttribute] The matrix in which to place the calculated data.

CreateRotationZ(Double)

Returns a matrix that can be used to rotate a set of vertices around the z-axis.

Declaration
public static MatrixD CreateRotationZ(double radians)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the z-axis. Note that you can use ToRadians to convert degrees to radians.

Returns
Type Description
MatrixD

CreateRotationZ(Double, out MatrixD)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the z-axis.

Declaration
public static void CreateRotationZ(double radians, out MatrixD result)
Parameters
Type Name Description
System.Double radians

The amount, in radians, in which to rotate around the z-axis. Note that you can use ToRadians to convert degrees to radians.

MatrixD result

[OutAttribute] The rotation matrix.

CreateScale(Double)

Creates a scaling Matrix.

Declaration
public static MatrixD CreateScale(double scale)
Parameters
Type Name Description
System.Double scale

Amount to scale by.

Returns
Type Description
MatrixD

CreateScale(Double, Double, Double)

Creates a scaling Matrix.

Declaration
public static MatrixD CreateScale(double xScale, double yScale, double zScale)
Parameters
Type Name Description
System.Double xScale

Value to scale by on the x-axis.

System.Double yScale

Value to scale by on the y-axis.

System.Double zScale

Value to scale by on the z-axis.

Returns
Type Description
MatrixD

CreateScale(Double, Double, Double, out MatrixD)

Creates a scaling Matrix.

Declaration
public static void CreateScale(double xScale, double yScale, double zScale, out MatrixD result)
Parameters
Type Name Description
System.Double xScale

Value to scale by on the x-axis.

System.Double yScale

Value to scale by on the y-axis.

System.Double zScale

Value to scale by on the z-axis.

MatrixD result

[OutAttribute] The created scaling Matrix.

CreateScale(Double, out MatrixD)

Creates a scaling Matrix.

Declaration
public static void CreateScale(double scale, out MatrixD result)
Parameters
Type Name Description
System.Double scale

Value to scale by.

MatrixD result

[OutAttribute] The created scaling Matrix.

CreateScale(Vector3D)

Creates a scaling Matrix.

Declaration
public static MatrixD CreateScale(Vector3D scales)
Parameters
Type Name Description
Vector3D scales

Amounts to scale by on the x, y, and z axes.

Returns
Type Description
MatrixD

CreateScale(ref Vector3D, out MatrixD)

Creates a scaling Matrix.

Declaration
public static void CreateScale(ref Vector3D scales, out MatrixD result)
Parameters
Type Name Description
Vector3D scales

Amounts to scale by on the x, y, and z axes.

MatrixD result

[OutAttribute] The created scaling Matrix.

CreateShadow(Vector3D, Plane)

Creates a Matrix that flattens geometry into a specified Plane as if casting a shadow from a specified light source.

Declaration
public static MatrixD CreateShadow(Vector3D lightDirection, Plane plane)
Parameters
Type Name Description
Vector3D lightDirection

A Vector3 specifying the direction from which the light that will cast the shadow is coming.

Plane plane

The Plane onto which the new matrix should flatten geometry so as to cast a shadow.

Returns
Type Description
MatrixD

CreateShadow(ref Vector3D, ref Plane, out MatrixD)

Fills in a Matrix to flatten geometry into a specified Plane as if casting a shadow from a specified light source.

Declaration
public static void CreateShadow(ref Vector3D lightDirection, ref Plane plane, out MatrixD result)
Parameters
Type Name Description
Vector3D lightDirection

A Vector3 specifying the direction from which the light that will cast the shadow is coming.

Plane plane

The Plane onto which the new matrix should flatten geometry so as to cast a shadow.

MatrixD result

[OutAttribute] A Matrix that can be used to flatten geometry onto the specified plane from the specified direction.

CreateTranslation(Double, Double, Double)

Creates a translation Matrix.

Declaration
public static MatrixD CreateTranslation(double xPosition, double yPosition, double zPosition)
Parameters
Type Name Description
System.Double xPosition

Value to translate by on the x-axis.

System.Double yPosition

Value to translate by on the y-axis.

System.Double zPosition

Value to translate by on the z-axis.

Returns
Type Description
MatrixD

CreateTranslation(Double, Double, Double, out MatrixD)

Creates a translation Matrix.

Declaration
public static void CreateTranslation(double xPosition, double yPosition, double zPosition, out MatrixD result)
Parameters
Type Name Description
System.Double xPosition

Value to translate by on the x-axis.

System.Double yPosition

Value to translate by on the y-axis.

System.Double zPosition

Value to translate by on the z-axis.

MatrixD result

[OutAttribute] The created translation Matrix.

CreateTranslation(Vector3)

Declaration
public static MatrixD CreateTranslation(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
MatrixD

CreateTranslation(Vector3D)

Creates a translation Matrix.

Declaration
public static MatrixD CreateTranslation(Vector3D position)
Parameters
Type Name Description
Vector3D position

Amounts to translate by on the x, y, and z axes.

Returns
Type Description
MatrixD

CreateTranslation(ref Vector3D, out MatrixD)

Creates a translation Matrix.

Declaration
public static void CreateTranslation(ref Vector3D position, out MatrixD result)
Parameters
Type Name Description
Vector3D position

Amounts to translate by on the x, y, and z axes.

MatrixD result

[OutAttribute] The created translation Matrix.

CreateWorld(Vector3D)

Declaration
public static MatrixD CreateWorld(Vector3D position)
Parameters
Type Name Description
Vector3D position
Returns
Type Description
MatrixD

CreateWorld(Vector3D, Vector3, Vector3)

Declaration
public static MatrixD CreateWorld(Vector3D position, Vector3 forward, Vector3 up)
Parameters
Type Name Description
Vector3D position
Vector3 forward
Vector3 up
Returns
Type Description
MatrixD

CreateWorld(Vector3D, Vector3D, Vector3D)

Creates a world matrix with the specified parameters.

Declaration
public static MatrixD CreateWorld(Vector3D position, Vector3D forward, Vector3D up)
Parameters
Type Name Description
Vector3D position

Position of the object. This value is used in translation operations.

Vector3D forward

Forward direction of the object.

Vector3D up

Upward direction of the object; usually [0, 1, 0].

Returns
Type Description
MatrixD

CreateWorld(ref Vector3D, ref Vector3D, ref Vector3D, out MatrixD)

Creates a world matrix with the specified parameters.

Declaration
public static void CreateWorld(ref Vector3D position, ref Vector3D forward, ref Vector3D up, out MatrixD result)
Parameters
Type Name Description
Vector3D position

Position of the object. This value is used in translation operations.

Vector3D forward

Forward direction of the object.

Vector3D up

Upward direction of the object; usually [0, 1, 0].

MatrixD result

[OutAttribute] The created world matrix.

Determinant()

Calculates the determinant of the matrix.

Declaration
public double Determinant()
Returns
Type Description
System.Double

Divide(MatrixD, Double)

Divides the components of a matrix by a scalar.

Declaration
public static MatrixD Divide(MatrixD matrix1, double divider)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

System.Double divider

The divisor.

Returns
Type Description
MatrixD

Divide(MatrixD, MatrixD)

Divides the components of a matrix by the corresponding components of another matrix.

Declaration
public static MatrixD Divide(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

The divisor.

Returns
Type Description
MatrixD

Divide(ref MatrixD, Double, out MatrixD)

Divides the components of a matrix by a scalar.

Declaration
public static void Divide(ref MatrixD matrix1, double divider, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

System.Double divider

The divisor.

MatrixD result

[OutAttribute] Result of the division.

Divide(ref MatrixD, ref MatrixD, out MatrixD)

Divides the components of a matrix by the corresponding components of another matrix.

Declaration
public static void Divide(ref MatrixD matrix1, ref MatrixD matrix2, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

The divisor.

MatrixD result

[OutAttribute] Result of the division.

Equals(Object)

Returns a value that indicates whether the current instance is equal to a specified object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object with which to make the comparison.

Returns
Type Description
System.Boolean

Equals(MatrixD)

Determines whether the specified Object is equal to the Matrix.

Declaration
public bool Equals(MatrixD other)
Parameters
Type Name Description
MatrixD other

The Object to compare with the current Matrix.

Returns
Type Description
System.Boolean

EqualsFast(ref MatrixD, Double)

Compares just position, forward and up

Declaration
public bool EqualsFast(ref MatrixD other, double epsilon = 0.0001)
Parameters
Type Name Description
MatrixD other
System.Double epsilon
Returns
Type Description
System.Boolean

GetClosestDirection(Vector3D)

Declaration
public Base6Directions.Direction GetClosestDirection(Vector3D referenceVector)
Parameters
Type Name Description
Vector3D referenceVector
Returns
Type Description
Base6Directions.Direction

GetClosestDirection(ref Vector3D)

Declaration
public Base6Directions.Direction GetClosestDirection(ref Vector3D referenceVector)
Parameters
Type Name Description
Vector3D referenceVector
Returns
Type Description
Base6Directions.Direction

GetDirectionVector(Base6Directions.Direction)

Gets the base vector of the matrix, corresponding to the given direction

Declaration
public Vector3D GetDirectionVector(Base6Directions.Direction direction)
Parameters
Type Name Description
Base6Directions.Direction direction
Returns
Type Description
Vector3D

GetEulerAnglesXYZ(ref MatrixD, out Vector3D)

Declaration
public static bool GetEulerAnglesXYZ(ref MatrixD mat, out Vector3D xyz)
Parameters
Type Name Description
MatrixD mat
Vector3D xyz
Returns
Type Description
System.Boolean

GetHashCode()

Gets the hash code of this object.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

GetOrientation()

Gets the orientation.

Declaration
public MatrixD GetOrientation()
Returns
Type Description
MatrixD

GetRow(Int32)

Declaration
public Vector4D GetRow(int row)
Parameters
Type Name Description
System.Int32 row
Returns
Type Description
Vector4D

HasNoTranslationOrPerspective()

Returns true if this matrix represents invertible (you can call Invert on it) linear (it does not contain translation or perspective transformation) transformation. Such matrix consist solely of rotations, shearing, mirroring and scaling. It can be orthogonalized to create an orthogonal rotation matrix.

Declaration
public bool HasNoTranslationOrPerspective()
Returns
Type Description
System.Boolean

Invert(MatrixD)

Calculates the inverse of a matrix.

Declaration
public static MatrixD Invert(MatrixD matrix)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

Returns
Type Description
MatrixD

Invert(ref MatrixD)

Declaration
public static MatrixD Invert(ref MatrixD matrix)
Parameters
Type Name Description
MatrixD matrix
Returns
Type Description
MatrixD

Invert(ref MatrixD, out MatrixD)

Calculates the inverse of a matrix.

Declaration
public static void Invert(ref MatrixD matrix, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix

The source matrix.

MatrixD result

[OutAttribute] The inverse of matrix. The same matrix can be used for both arguments.

IsMirrored()

Declaration
public bool IsMirrored()
Returns
Type Description
System.Boolean

IsNan()

Declaration
public bool IsNan()
Returns
Type Description
System.Boolean

IsOrthogonal()

Declaration
public bool IsOrthogonal()
Returns
Type Description
System.Boolean

IsOrthogonal(Double)

Declaration
public bool IsOrthogonal(double epsilon)
Parameters
Type Name Description
System.Double epsilon
Returns
Type Description
System.Boolean

IsRotation()

Declaration
public bool IsRotation()
Returns
Type Description
System.Boolean

IsValid()

Declaration
public bool IsValid()
Returns
Type Description
System.Boolean

Lerp(MatrixD, MatrixD, Double)

Linearly interpolates between the corresponding values of two matrices.

Declaration
public static MatrixD Lerp(MatrixD matrix1, MatrixD matrix2, double amount)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

System.Double amount

Interpolation value.

Returns
Type Description
MatrixD

Lerp(ref MatrixD, ref MatrixD, Double, out MatrixD)

Linearly interpolates between the corresponding values of two matrices.

Declaration
public static void Lerp(ref MatrixD matrix1, ref MatrixD matrix2, double amount, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

System.Double amount

Interpolation value.

MatrixD result

[OutAttribute] Resulting matrix.

Multiply(ref Matrix, ref MatrixD, out MatrixD)

Declaration
public static void Multiply(ref Matrix matrix1, ref MatrixD matrix2, out MatrixD result)
Parameters
Type Name Description
Matrix matrix1
MatrixD matrix2
MatrixD result

Multiply(MatrixD, Double)

Multiplies a matrix by a scalar value.

Declaration
public static MatrixD Multiply(MatrixD matrix1, double scaleFactor)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

System.Double scaleFactor

Scalar value.

Returns
Type Description
MatrixD

Multiply(MatrixD, Matrix)

Multiplies a matrix by another matrix.

Declaration
public static MatrixD Multiply(MatrixD matrix1, Matrix matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

Matrix matrix2

Source matrix.

Returns
Type Description
MatrixD

Multiply(MatrixD, MatrixD)

Multiplies a matrix by another matrix.

Declaration
public static MatrixD Multiply(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

Multiply(ref MatrixD, Double, out MatrixD)

Multiplies a matrix by a scalar value.

Declaration
public static void Multiply(ref MatrixD matrix1, double scaleFactor, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

System.Double scaleFactor

Scalar value.

MatrixD result

[OutAttribute] The result of the multiplication.

Multiply(ref MatrixD, ref Matrix, out MatrixD)

Multiplies a matrix by another matrix.

Declaration
public static void Multiply(ref MatrixD matrix1, ref Matrix matrix2, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

Matrix matrix2

Source matrix.

MatrixD result

[OutAttribute] Result of the multiplication.

Multiply(ref MatrixD, ref MatrixD, out MatrixD)

Multiplies a matrix by another matrix.

Declaration
public static void Multiply(ref MatrixD matrix1, ref MatrixD matrix2, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

MatrixD result

[OutAttribute] Result of the multiplication.

Negate(MatrixD)

Negates individual elements of a matrix.

Declaration
public static MatrixD Negate(MatrixD matrix)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

Returns
Type Description
MatrixD

Negate(ref MatrixD, out MatrixD)

Negates individual elements of a matrix.

Declaration
public static void Negate(ref MatrixD matrix, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

MatrixD result

[OutAttribute] Negated matrix.

Normalize(MatrixD)

Declaration
public static MatrixD Normalize(MatrixD matrix)
Parameters
Type Name Description
MatrixD matrix
Returns
Type Description
MatrixD

Orthogonalize()

Declaration
public void Orthogonalize()

Orthogonalize(MatrixD)

Declaration
public static MatrixD Orthogonalize(MatrixD rotationMatrix)
Parameters
Type Name Description
MatrixD rotationMatrix
Returns
Type Description
MatrixD

Rescale(MatrixD, Double)

Declaration
public static MatrixD Rescale(MatrixD matrix, double scale)
Parameters
Type Name Description
MatrixD matrix
System.Double scale
Returns
Type Description
MatrixD

Rescale(MatrixD, Vector3D)

Declaration
public static MatrixD Rescale(MatrixD matrix, Vector3D scale)
Parameters
Type Name Description
MatrixD matrix
Vector3D scale
Returns
Type Description
MatrixD

Rescale(ref MatrixD, Double)

Same result as Matrix.CreateScale(scale) * matrix, but much faster

Declaration
public static void Rescale(ref MatrixD matrix, double scale)
Parameters
Type Name Description
MatrixD matrix
System.Double scale

Rescale(ref MatrixD, Single)

Same result as Matrix.CreateScale(scale) * matrix, but much faster

Declaration
public static void Rescale(ref MatrixD matrix, float scale)
Parameters
Type Name Description
MatrixD matrix
System.Single scale

Rescale(ref MatrixD, ref Vector3D)

Same result as Matrix.CreateScale(scale) * matrix, but much faster

Declaration
public static void Rescale(ref MatrixD matrix, ref Vector3D scale)
Parameters
Type Name Description
MatrixD matrix
Vector3D scale

SetDirectionVector(Base6Directions.Direction, Vector3D)

Sets the base vector of the matrix, corresponding to the given direction

Declaration
public void SetDirectionVector(Base6Directions.Direction direction, Vector3D newValue)
Parameters
Type Name Description
Base6Directions.Direction direction
Vector3D newValue

SetFrom(in Matrix)

Declaration
public void SetFrom(in Matrix m)
Parameters
Type Name Description
Matrix m

SetRotationAndScale(in Matrix)

Declaration
public void SetRotationAndScale(in Matrix m)
Parameters
Type Name Description
Matrix m

SetRow(Int32, Vector4)

Declaration
public void SetRow(int row, Vector4 value)
Parameters
Type Name Description
System.Int32 row
Vector4 value

Slerp(MatrixD, MatrixD, Double)

Performs spherical linear interpolation of position and rotation.

Declaration
public static MatrixD Slerp(MatrixD matrix1, MatrixD matrix2, double amount)
Parameters
Type Name Description
MatrixD matrix1
MatrixD matrix2
System.Double amount
Returns
Type Description
MatrixD

Slerp(in MatrixD, in MatrixD, Double, out MatrixD)

Performs spherical linear interpolation of position and rotation.

Declaration
public static void Slerp(in MatrixD matrix1, in MatrixD matrix2, double amount, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1
MatrixD matrix2
System.Double amount
MatrixD result

SlerpScale(MatrixD, MatrixD, Double)

Performs spherical linear interpolation of position and rotation and scale.

Declaration
public static MatrixD SlerpScale(MatrixD matrix1, MatrixD matrix2, double amount)
Parameters
Type Name Description
MatrixD matrix1
MatrixD matrix2
System.Double amount
Returns
Type Description
MatrixD

SlerpScale(MatrixD, MatrixD, Double, out MatrixD)

Performs spherical linear interpolation of position and rotation and scale.

Declaration
public static void SlerpScale(MatrixD matrix1, MatrixD matrix2, double amount, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1
MatrixD matrix2
System.Double amount
MatrixD result

SlerpScale(ref MatrixD, ref MatrixD, Double, out MatrixD)

Performs spherical linear interpolation of position and rotation and scale.

Declaration
public static void SlerpScale(ref MatrixD matrix1, ref MatrixD matrix2, double amount, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1
MatrixD matrix2
System.Double amount
MatrixD result

Subtract(Matrix, Matrix)

Subtracts matrices.

Declaration
public static Matrix Subtract(Matrix matrix1, Matrix matrix2)
Parameters
Type Name Description
Matrix matrix1

Source matrix.

Matrix matrix2

Source matrix.

Returns
Type Description
Matrix

Subtract(ref MatrixD, ref MatrixD, out MatrixD)

Subtracts matrices.

Declaration
public static void Subtract(ref MatrixD matrix1, ref MatrixD matrix2, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

MatrixD result

[OutAttribute] Result of the subtraction.

SwapYZCoordinates(MatrixD)

Declaration
public static MatrixD SwapYZCoordinates(MatrixD m)
Parameters
Type Name Description
MatrixD m
Returns
Type Description
MatrixD

ToString()

Retrieves a string representation of the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String

Transform(MatrixD, Quaternion)

Transforms a Matrix by applying a Quaternion rotation.

Declaration
public static MatrixD Transform(MatrixD value, Quaternion rotation)
Parameters
Type Name Description
MatrixD value

The Matrix to transform.

Quaternion rotation

The rotation to apply, expressed as a Quaternion.

Returns
Type Description
MatrixD

Transform(ref MatrixD, ref Quaternion, out MatrixD)

Transforms a Matrix by applying a Quaternion rotation.

Declaration
public static void Transform(ref MatrixD value, ref Quaternion rotation, out MatrixD result)
Parameters
Type Name Description
MatrixD value

The Matrix to transform.

Quaternion rotation

The rotation to apply, expressed as a Quaternion.

MatrixD result

[OutAttribute] An existing Matrix filled in with the result of the transform.

Transpose(MatrixD)

Transposes the rows and columns of a matrix.

Declaration
public static MatrixD Transpose(MatrixD matrix)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

Returns
Type Description
MatrixD

Transpose(ref MatrixD, out MatrixD)

Transposes the rows and columns of a matrix.

Declaration
public static void Transpose(ref MatrixD matrix, out MatrixD result)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

MatrixD result

[OutAttribute] Transposed matrix.

Operators

Addition(MatrixD, MatrixD)

Adds a matrix to another matrix.

Declaration
public static MatrixD operator +(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

Division(MatrixD, Double)

Divides the components of a matrix by a scalar.

Declaration
public static MatrixD operator /(MatrixD matrix1, double divider)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

System.Double divider

The divisor.

Returns
Type Description
MatrixD

Division(MatrixD, MatrixD)

Divides the components of a matrix by the corresponding components of another matrix.

Declaration
public static MatrixD operator /(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

The divisor.

Returns
Type Description
MatrixD

Equality(MatrixD, MatrixD)

Compares a matrix for equality with another matrix.

Declaration
public static bool operator ==(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
System.Boolean

Implicit(in Matrix to MatrixD)

Declaration
public static implicit operator MatrixD(in Matrix m)
Parameters
Type Name Description
Matrix m
Returns
Type Description
MatrixD

Implicit(in MatrixD to Matrix)

Declaration
public static implicit operator Matrix(in MatrixD m)
Parameters
Type Name Description
MatrixD m
Returns
Type Description
Matrix

Inequality(MatrixD, MatrixD)

Tests a matrix for inequality with another matrix.

Declaration
public static bool operator !=(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

The matrix on the left of the equal sign.

MatrixD matrix2

The matrix on the right of the equal sign.

Returns
Type Description
System.Boolean

Multiply(Double, MatrixD)

Multiplies a matrix by a scalar value.

Declaration
public static MatrixD operator *(double scaleFactor, MatrixD matrix)
Parameters
Type Name Description
System.Double scaleFactor

Scalar value.

MatrixD matrix

Source matrix.

Returns
Type Description
MatrixD

Multiply(Matrix, MatrixD)

Multiplies a matrix by another matrix.

Declaration
public static MatrixD operator *(Matrix matrix1, MatrixD matrix2)
Parameters
Type Name Description
Matrix matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

Multiply(MatrixD, Double)

Multiplies a matrix by a scalar value.

Declaration
public static MatrixD operator *(MatrixD matrix, double scaleFactor)
Parameters
Type Name Description
MatrixD matrix

Source matrix.

System.Double scaleFactor

Scalar value.

Returns
Type Description
MatrixD

Multiply(MatrixD, Matrix)

Multiplies a matrix by another matrix.

Declaration
public static MatrixD operator *(MatrixD matrix1, Matrix matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

Matrix matrix2

Source matrix.

Returns
Type Description
MatrixD

Multiply(MatrixD, MatrixD)

Multiplies a matrix by another matrix.

Declaration
public static MatrixD operator *(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

Subtraction(MatrixD, MatrixD)

Subtracts matrices.

Declaration
public static MatrixD operator -(MatrixD matrix1, MatrixD matrix2)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

MatrixD matrix2

Source matrix.

Returns
Type Description
MatrixD

UnaryNegation(MatrixD)

Negates individual elements of a matrix.

Declaration
public static MatrixD operator -(MatrixD matrix1)
Parameters
Type Name Description
MatrixD matrix1

Source matrix.

Returns
Type Description
MatrixD
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾