rotate -package:base
Apply a rotation to a vector.
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.
A picture rotated clockwise by the given angle (in degrees).
Copied from Graphics.Rendering.Cairo.Matrix Rotations angle is given
in radians.
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
Specifies a rotation by rotate-angle degrees
Combinator for the rotate attribute.
Specifies a rotation by rotate-angle degrees
Create a transformation representing a rotation on the plane.
fill . transform (applyTransformation $ rotate 0.2)
$ rectangle (V2 40 40) 120 120
rotate f rotates a diagram clockwise by fraction f
of a complete revolution. rotate f is equivalent to
rotateR (2*pi*f).
Create a transform that rotates by the given angle (radians).
Rotate the current transform matrix.
Rotates current coordinate system. Angle is specified in radians.