PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ sphere_distance_cartesian()

double sphere_distance_cartesian ( const POINT3D s,
const POINT3D e 
)

Given two unit vectors, calculate their distance apart in radians.

Definition at line 967 of file lwgeodetic.c.

968 {
969  return acos(FP_MIN(1.0, dot_product(s, e)));
970 }
char * s
Definition: cu_in_wkt.c:23
#define FP_MIN(A, B)
static double dot_product(const POINT3D *p1, const POINT3D *p2)
Convert cartesian coordinates on unit sphere to lon/lat coordinates static void cart2ll(const POINT3D...
Definition: lwgeodetic.c:446

References dot_product(), FP_MIN, and s.

Referenced by sphere_angle().

Here is the call graph for this function:
Here is the caller graph for this function: