Calculates the unit normal to two vectors, trying to avoid problems with over-narrow or over-wide cases.
Definition at line 537 of file lwgeodetic.c.
References cross_product(), dot_product(), normalize(), vector_difference(), and vector_sum().
Referenced by clairaut_cartesian(), edge_calculate_gbox(), edge_intersection(), edge_intersects(), test_sphere_project(), and vector_rotate().
549 else if ( p_dot > 0.95 )
void normalize(POINT3D *p)
Normalize to a unit vector.
static double dot_product(const POINT3D *p1, const POINT3D *p2)
Convert cartesion coordinates on unit sphere to lon/lat coordinates static void cart2ll(const POINT3D...
static void vector_difference(const POINT3D *a, const POINT3D *b, POINT3D *n)
Calculate the difference of two vectors.
void vector_sum(const POINT3D *a, const POINT3D *b, POINT3D *n)
Calculate the sum of two vectors.
static void cross_product(const POINT3D *a, const POINT3D *b, POINT3D *n)
Calculate the cross product of two vectors.