gcirc(u,ra1,dc1,ra2,dc2)
If (ra1,dc1) are scalars and (ra2,dc2) are vectors, then dis is a vector giving the distance of each element of (ra2,dc2) to (ra1,dc1). Similarly, if (ra1,dc1) are vectors and (ra2,dc2) are scalars, then dis is a vector giving the distance of each element of (ra1,dc1) to (ra2,dc2). If both (ra1,dc1) and (ra2,dc2) are vectors then dis is a vector giving the distance of each element of (ra1,dc1) to the corresponding element of (ra2,dc2). If the input vectors are not the same length, then excess elements of the longer ones will be ignored.
The astrolib function sphdist provides an alternate method of computing a spherical distance.
sphdist
gcirc(2, 100., -35., 180., +35)
Run the code above in your browser using DataLab