Skip to contents

This function calculates the spherical distance between two vectors.

Usage

spherical_dist(x, y)

Arguments

x

A numeric vector.

y

A numeric vector.

Value

The distance between vectors x and y.

Examples

x <- c(1, 0, 0)
y <- c(0, 1, 0)
spherical_dist(x, y)
#> [1] 1.570796