rotate x i rotates x left by i bits
if i is positive, or right by -i bits otherwise.
For unbounded types like Integer, rotate is equivalent
to shift.
An instance can define either this unified rotate or
rotateL and rotateR, depending on which is more
convenient for the type in question.
Modifies the current transformation matrix (CTM) by rotating the
user-space axes by angle radians. The rotation of the axes
takes places after any existing transformation of user space. The
rotation direction for positive angles is from the positive X axis
toward the positive Y axis.
Rotate about the local origin by the given angle. Positive angles
correspond to counterclockwise rotation, negative to clockwise. The
angle can be expressed using any of the Isos on Angle.
For example, rotate (1/4 @@ turn), rotate (tau/4
@@ rad), and rotate (90 @@ deg) all represent the same
transformation, namely, a counterclockwise rotation by a right angle.
To rotate about some point other than the local origin, see
rotateAbout.
Note that writing rotate (1/4), with no Angle
constructor, will yield an error since GHC cannot figure out which
sort of angle you want to use. In this common situation you can use
rotateBy, which interprets its argument as a number of turns.
Rotates the stack elements between the valid index idx and
the top of the stack. The elements are rotated n positions in
the direction of the top, for a positive n, or -n
positions in the direction of the bottom, for a negative n.
The absolute value of n must not be greater than the size of
the slice being rotated. This function cannot be called with a
pseudo-index, because a pseudo-index is not an actual stack position.
https://www.lua.org/manual/5.4/manual.html#lua_rotate