Skip to content

createRotateMatrix

createRotateMatrix(angle, pivotPoint?): TMat2D

Defined in: src/util/misc/matrix.ts:169

Generate a rotation matrix around around a point (x,y), defaulting to (0,0)

A matrix in the form of [cos(a) -sin(a) -xcos(a)+ysin(a)+x] [sin(a) cos(a) -xsin(a)-ycos(a)+y] [0 0 1 ]

Parameters

angle

TRotateMatrixArgs = {}

rotation in degrees

pivotPoint?

Partial<XY> = {}

pivot point to rotate around

Returns

TMat2D

matrix