bearing | R Documentation |
The angle between a line between 2 points in Euclidean 2-D space and the line from (0,0) to (0,1) is calculated. In other words, the compass bearing of a line between 2 points where north is 0. Angles increase in clockwise direction.
bearing(point1, point2, fullcirc = FALSE)
point1 |
numeric vector holding the x and y coordinates of the first point. |
point2 |
numeric vector holding the x and y coordinates of the second point. |
fullcirc |
logical value indicating whether the output should be an angle on [0, 2π) or [-π, π). |
If fullcirc = FALSE
, the function returns a numeric
value (angle) from the interval [-π, π).
If fullcirc = TRUE
, the function returns a numeric value numeric from the interval
[0, 2π).
bearing(c(3,5), c(1,4)) bearing(c(3,5), c(1,4), fullcirc = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.