Function rotate

rotate(theta, [x], [y]) returns a counter-clockwise 2D rotation by an angle $\theta$, optionally around the point $(x,y)$. If no point is specified, the rotation is around the origin.

  • Parameters

    • theta: Num

      angle of rotation (in radians)

    • x: Num = 0

      center of rotation (x coordinate)

    • y: Num = 0

      center of rotation (y coordinate)

    Returns Num[][]

    Rotation matrix