8 #ifndef IMPALGEBRA_UTILITY_H
9 #define IMPALGEBRA_UTILITY_H
12 #include <IMP/algebra/algebra_config.h>
15 IMPALGEBRA_BEGIN_NAMESPACE
18 inline bool xorT(
bool x,
bool y)
20 return (((x) && !(y)) || (!(x) && (y)));
24 inline double get_squared(
double x){
52 return static_cast<int>((x) + 0.5);
54 return static_cast<int>((x) - 0.5);
76 if (x < x0)
return x0;
77 if (x > xF)
return xF;
104 if((x-q)<(p-x)) {
return q; }
113 const double epsilon)
115 return (std::abs(a-b) < epsilon);
118 IMPALGEBRA_END_NAMESPACE