Skip to contents

Angular separation between sky coordinates

Usage

separation(x, y, unit = "arcsec")

Arguments

x, y

<sky_coord> vectors.

unit

Separation unit: `"arcsec"` (default), `"arcmin"`, `"deg"`, or `"rad"`.

Value

Numeric vector of angular separation.

Examples

x <- ra_dec(10, 20)
y <- ra_dec(11, 21)
separation(x, y)
#> [1] 4932.552

g <- transform_to(x, galactic())
separation(g, y)
#> [1] 4932.552