v1.1
 
Matrix2D Class Reference

The matrix of transformation in a two-dimensional space. More...

Public Member Functions

 Matrix2D ()
 The default constructor.
 
self Shift (number x, number y)
 Shifts the matrix.
 
self Rotate (Point2D point, number angle)
 Rotates the matrix.
 
self Scale (Point2D point, number xScale, number yScale)
 Scales the matrix.
 
self Transform (Matrix2D matrix)
 Transforms according to the matrix.
 
self Invert ()
 Inverts matrix.
 
Matrix2D Clone ()
 Returns a copy of the object.
 
boolean operator== (Matrix2D other)
 Checks for equality.
 
boolean operator~= (Matrix2D other)
 Checks for inequality.
 

Detailed Description

The matrix of transformation in a two-dimensional space.

Member Function Documentation

◆ Rotate()

self Rotate ( Point2D point,
number angle )

Rotates the matrix.

Parameters
pointCenter of rotation.
angleThe angle in radians.

◆ Scale()

self Scale ( Point2D point,
number xScale,
number yScale )

Scales the matrix.

Parameters
pointShift point.
xScaleThe X scale factor.
yScaleThe Y scale factor.