BRL-CAD
tol.h File Reference
#include "common.h"
#include "bn/defines.h"
#include "bu/magic.h"
Include dependency graph for tol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bn_tol
 Support for uniform tolerances. More...
 

Macros

#define BN_CK_TOL(_p)   BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol")
 
#define BN_TOL_INIT(_p)
 
#define BN_TOL_INIT_ZERO   { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0 }
 
#define BN_TOL_IS_INITIALIZED(_p)   (((struct bn_tol *)(_p) != (struct bn_tol *)0) && LIKELY((_p)->magic == BN_TOL_MAGIC))
 
#define BN_TOL_DIST   0.0005
 
#define BN_VECT_ARE_PARALLEL(_dot, _tol)   (((_dot) <= -SMALL_FASTF) ? (NEAR_EQUAL((_dot), -1.0, (_tol)->perp)) : (NEAR_EQUAL((_dot), 1.0, (_tol)->perp)))
 
#define BN_VECT_ARE_PERP(_dot, _tol)   (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp))