powered by
Geodesic distance on spheres.
SpheGeoDist(y1, y2)
A scalar holding the geodesic distance between y1 and y2.
y1
y2
Two unit vectors, i.e., with \(L^2\) norm equal to 1, of the same length.
d <- 3 y1 <- rnorm(d) y1 <- y1 / sqrt(sum(y1^2)) y2 <- rnorm(d) y2 <- y2 / sqrt(sum(y2^2)) dist <- SpheGeoDist(y1,y2)
Run the code above in your browser using DataLab