rotatePt_2D | R Documentation |
Rotates a 2D point by a given angle (counter-clockwise)
rotatePt_2D(x, y, angle)
x |
X-axis coordinate of the point to be rotated |
y |
Y-axis coordinate of the point to be rotated |
angle |
Rotation angle, given in radians |
A vector containing the rotated coordinates (x,y)
Cornel M. Pop
x = 1.5
y = 0
a = 0.2
pt.r = rotatePt_2D(x, y, a) # 1.4701, 0.298004
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.