Learn R Programming

spheresmooth (version 0.1.3)

spherical_dist: Calculate spherical distance between two vectors

Description

This function calculates the spherical distance between two vectors.

Usage

spherical_dist(x, y)

Value

The distance between vectors x and y.

Arguments

x

A numeric vector.

y

A numeric vector.

Examples

Run this code
x <- c(1, 0, 0)
y <- c(0, 1, 0)
spherical_dist(x, y)

Run the code above in your browser using DataLab