rotate package:diagrams-lib

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.
rotationAbout p d a is a rotation about a line parallel to d passing through p.
rotateAbout p is like rotate, except it rotates around the point p instead of around the local origin.
A synonym for rotate, interpreting its argument in units of turns; it can be more convenient to write rotateBy (1/4) than rotate (1/4 @@ turn).
Rotate around the local origin such that the x axis aligns with the given direction.
Use an Angle to make an ReifiedIso between an object rotated and unrotated. This us useful for performing actions under a rotation:
under (rotated t) f = rotate (negated t) . f . rotate t
rotated t ## a      = rotate t a
a ^. rotated t      = rotate (-t) a
over (rotated t) f  = rotate t . f . rotate (negated t)
Rotate and uniformly scale around the local origin such that the x-axis aligns with the given vector. This satisfies the equation
scaleRotateTo v = rotateTo (dir v) . scale (norm v)
up to floating point rounding errors, but is more accurate and performant since it avoids cancellable uses of trigonometric functions.