28 #if defined ( _MSC_VER )
34 #include <boost/math/constants/constants.hpp>
36 #include "../WExportCommon.h"
39 #include "linearAlgebra/WLinearAlgebra.h"
50 const float piFloat = boost::math::constants::pi<float>();
55 const double piDouble = boost::math::constants::pi<double>();
61 inline int myIsfinite(
double number )
63 #if defined( __linux__ ) || defined( __APPLE__ )
65 return std::isfinite(number);
66 #elif defined( _WIN32 )
68 return _finite(number);
70 WAssert(
false,
"isfinite not provided on this platform or platform not known." );
100 bool OWCOMMON_EXPORT intersectPlaneSegment(
const WPlane& p,
103 boost::shared_ptr< WPosition > pointOfIntersection );
116 bool OWCOMMON_EXPORT intersectPlaneLineNearCP(
const WPlane& p,
const WLine& l, boost::shared_ptr< WPosition > cutPoint );
126 template<
typename T >
int signum(
const T& value );
132 inline unsigned int OWCOMMON_EXPORT oddFactorial(
unsigned int border )
134 unsigned int result = 1;
135 for(
unsigned int i = 3; i <= border; i+=2 )
146 inline unsigned int OWCOMMON_EXPORT evenFactorial(
unsigned int border )
148 unsigned int result = 1;
149 for(
unsigned int i = 2; i <= border; i+=2 )
165 template<
typename T >
168 T res =
static_cast< T
>( 1 );
173 for( T k = res; k <= i; ++k )
180 template<
typename T >
inline int signum(
const T& value )