Rotates a trajectory by angle (when relative is FALSE),
or so that angle(finish - start) == angle (when relative is
TRUE).
TrajRotate(trj, angle = 0, origin = c(0, 0), relative = TRUE)A new trajectory which is a rotated version of the input trajectory.
The trajectory to be rotated.
The angle of rotation in radians. Either the first and last
points in the rotated trajectory (when relative = TRUE), or else the
angle be rotated (when relative = FALSE).
Trajectory is rotated about this point.
If TRUE, angle is the angle (after rotation) from the
start to the end point of the trajectory. If FALSE, the trajectory is
rotated about its start point by angle. You probably want to use
relative = TRUE.