Transform.rotate

Combine the current transform with a rotation.

The center of rotation is provided for convenience as a second argument, so that you can build rotations around arbitrary points more easily (and efficiently) than the usual translate(-center).rotate(angle).translate(center).

This function returns a reference to this, so that calls can be chained.

  1. Transform rotate(float angle)
  2. Transform rotate(float angle, float centerX, float centerY)
    struct Transform
    ref
    rotate
    (
    float angle
    ,
    float centerX
    ,
    float centerY
    )
  3. Transform rotate(float angle, Vector2f center)

Parameters

angle float

Rotation angle, in degrees

centerX float

X coordinate of the center of rotation

centerY float

Y coordinate of the center of rotation

Return Value

Type: Transform

this

Meta