rotate_xy function

Rotate a matrix of x and y coordinates by a radian

Rotate a matrix of x and y coordinates by a radian

rotate_xy(xy_mat, rad, direction = 1)

Arguments

  • xy_mat: A two column matrix with x and y coordinates.
  • rad: Numeric. Rotation angle in radian.
  • direction: Numeric. Rotation direction, 1 for clockwise -1 for counter-clockwise.