Contains the 2D transform matrix type and functions for composing transformation matricies.
Represents a transformation matrix that can be used to transform forms. This is more useful than just using the composing methods in the graphics API, as it can perform skewing and other complex transformation techniques.
Construct an identity transformation matrix. Anything transformed by this matrix will remain the same.
Construct a transformation matrix with specific row/column values.
matrix a b c d x y
/ a b x c d y /
Construct a counter-clockwise rotating transformation matrix.
/ cos t -sin t 0 sin t cos t 0 /
Construct a translating transformation matrix.
translation (V2 x y)
/ 1 0 x 0 1 y /
Construction a scaling transformation matrix. To scale in all directions, simply have the x and y values the same. Alternatively, to scale by only one direction, keep the excluded dimenion's vector component as 1.
scale (V2 x y)
/ x 0 0 0 y 0 /