Contents

rotate(byDegrees:)

Mutates an affine transformation matrix to apply a rotation.

Declaration

mutating func rotate(byDegrees angle: CGFloat)

Parameters

  • angle:

    The rotation angle in degrees.

Discussion

The matrix takes the following form:

[  cos α   sin α  0 ]
[ -sin α   cos α  0 ]
[    0       0    1 ]

See Also

Accumulating Tranformations