A very simple Matrix replacement class, that offers better performance for many use cases.

Namespace: yWorks.Canvas.Geometry
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version:


public sealed class Matrix2D : ICloneable, IEquatable<Matrix2D>
Visual Basic
Public NotInheritable Class Matrix2D _ Implements ICloneable, IEquatable(Of Matrix2D)


The matrix is interpreted row-major. The rows are defined as follows: [ m11 m12 dx ], [ m21 m22 dy ], ([ 0 0 1 ] implicitly).

When transforming a vector V using this matrix, the multiplication is done in this order: V' = M * V.

Prepending a matrix T to this instance results in the operation M' = M * T. In concept, this means that T is applied before M when applying M' to a vector. Appending T to M results in M' = T * M.

Inheritance Hierarchy


See Also