| rotate_vec_ccw | R Documentation |
Internal utility to rotate 2D coordinates by a given angle (in radians), using a standard rotation matrix.
rotate_vec_ccw(x, y, theta)
x |
Numeric vector of x coordinates. |
y |
Numeric vector of y coordinates. |
theta |
Rotation angle in radians (counter-clockwise). |
The rotation follows:
x' = x \cos(\theta) - y \sin(\theta)
y' = x \sin(\theta) + y \cos(\theta)
A data.frame with rotated coordinates:
Rotated x coordinates
Rotated y coordinates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.