Used in prepData
.
turnAngle(x, y, z, LLangle)
The angle between vectors (x,y) and (y,z)
First point
Second point
Third point
Logical. If TRUE, the turning angle is calculated with
geosphere::bearing
, else calculated with atan2
.
if (FALSE) {
x <- c(0,0)
y <- c(4,6)
z <- c(10,7)
turnAngle(x,y,z,LLangle=FALSE)
}
Run the code above in your browser using DataLab