rotate {matRiks} | R Documentation |
Rotation rule (Method)
Description
Apply a rotation of a fixed angle to a figure
Usage
rotate(fig, n, rule, ...)
## S3 method for class 'figure'
rotate(fig, n = 4, rule = "rotation", ...)
Arguments
fig |
The figure on which the rule is applied |
n |
integer, defines the angle of the rotation. Default is 4, which corresponds to a rotation of |
rule |
character, defines the rotation rule. Default is counterclockwise. If the rule arguments contain the string "inv" forces a clockwise rotation. Each corresponds to an |
... |
Other arguments |
Value
A figure of class figure with different rotation coordinates
A figure of class figure with different rotation coordinates
Methods (by class)
-
rotate(figure)
: Rotate a figureApply a rotation of a fixed angle to a figure
Examples
# default luck
draw(luck())
# apply the default rotation on the default luck
draw(rotate(luck()))
# force clockwise rotation
draw(rotate(luck(), rule = "inv"))
# default luck
draw(luck())
# apply the default rotation on the default luck
draw(rotate(luck()))
# force clockwise rotation
draw(rotate(luck(), rule = "inv"))
[Package matRiks version 0.1.3 Index]