| 635 | } // anonymous namespace |
| 636 | |
| 637 | inline double det(const PJ_XYZ *u, const PJ_XYZ *v, const PJ_XYZ *w) { |
| 638 | return (u->x * (v->y * w->z - v->z * w->y) - |
| 639 | v->x * (u->y * w->z - u->z * w->y) + |
| 640 | w->x * (u->y * v->z - u->z * v->y)); |
| 641 | } |
| 642 | |
| 643 | inline bool is_point_in_face(const PJ_XYZ *p, const pj_face *face) { |
| 644 | return (det(p, &face->p2, &face->p3) <= 0 && |