sl.xyz.angle | R Documentation |
Compute the angle between two 3D vectors.
sl.xyz.angle(a, b)
a |
a vector of length 3 specifying the x-y-z components of the first vector. |
b |
a vector of length 3 specifying the x-y-z components of the second vector. |
This function is based on the scalar product using the operator %*%
.
A scalar giving the angle between the two vectors in degrees.
Helge Goessling
sl.lonlat.angle
sl.xyz.angle(c(1,0,0),c(0,0,1))
## Should return:
## [1] 90
sl.xyz.angle(c(1,0,0),c(0,0,2))
## Should return:
## [1] 90
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.