83#define BN_CK_TOL(_p) BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol")
88#define BN_TOL_INIT(_p) { \
89 (_p)->magic = BN_TOL_MAGIC; \
91 (_p)->dist_sq = 0.0; \
100#define BN_TOL_INIT_ZERO { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0 }
105#define BN_TOL_IS_INITIALIZED(_p) (((struct bn_tol *)(_p) != (struct bn_tol *)0) && LIKELY((_p)->magic == BN_TOL_MAGIC))
110#define BN_TOL_DIST 0.0005
116#define BN_VECT_ARE_PARALLEL(_dot, _tol) \
117 (((_dot) <= -SMALL_FASTF) ? (NEAR_EQUAL((_dot), -1.0, (_tol)->perp)) : (NEAR_EQUAL((_dot), 1.0, (_tol)->perp)))
123#define BN_VECT_ARE_PERP(_dot, _tol) \
124 (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp))
Header file for the BRL-CAD common definitions.
Global registry of recognized magic numbers.
double dist_sq
dist * dist