Applies a 3x3 rotation matrix to a set of 3D coordinates.
Arguments
- x,
y, z Numeric vectors of equal length representing 3D coordinates.
- rotation_matrix
A 3x3 numeric matrix used to rotate the coordinates.
Examples
rot_mat <- create_rotation_matrix(90, "z")
rotate_coords(1, 0, 0, rot_mat)
#> x y z
#> 1 6.123032e-17 -1 0