rotate
rotate(w, theta)
rotate(w, theta, v)
Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.
Try it yourself:
$1 | rotate([1, 0], pi / 2)
| |
$2 | rotate(matrix([1, 0]), unit("35deg"))
| |
$3 | rotate([1, 0, 0], unit("90deg"), [0, 0, 1])
| |
$4 | rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))
|