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)
  3. Transform rotate(float angle, Vector2f center)
    struct Transform
    ref
    rotate

Parameters

angle float

Rotation angle, in degrees

center Vector2f

Center of rotation

Return Value

Type: Transform

this

Meta