rotate
A matrix that rotates points around the origin. With the y axis pointing down (screen, CSS,
SVG), a positive angle turns clockwise, like CSS rotate().
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
radians | number | The angle, in radians |
Returns
Section titled “Returns”Matrix — The rotation matrix
Examples
Section titled “Examples”Quarter turn
Section titled “Quarter turn”With y pointing down, a positive angle turns clockwise, like CSS rotate().
Degrees
Section titled “Degrees”Convert degrees to radians first.
Related Types
Section titled “Related Types”Matrix
Section titled “Matrix”A 2D affine transformation, in the layout of CSS and SVG matrix(a, b, c, d, e, f):
