31 #include <boost/math/constants/constants.hpp>
35 #include "linearAlgebra/WPosition.h"
48 template<
typename T >
51 return boost::math::constants::pi< T >();
61 return boost::math::constants::pi< double >();
74 #define piFloat pi< float >()
103 bool intersectPlaneSegment(
const WPlane& p,
106 std::shared_ptr< WPosition > pointOfIntersection );
119 bool intersectPlaneLineNearCP(
const WPlane& p,
const WLine& l, std::shared_ptr< WPosition > cutPoint );
129 template<
typename T >
int signum(
const T& value );
135 inline unsigned int oddFactorial(
unsigned int border )
137 unsigned int result = 1;
138 for(
unsigned int i = 3; i <= border; i+=2 )
149 inline unsigned int evenFactorial(
unsigned int border )
151 unsigned int result = 1;
152 for(
unsigned int i = 2; i <= border; i+=2 )
168 template<
typename T >
171 T res =
static_cast< T
>( 1 );
176 for( T k = res; k <= i; ++k )
192 template<
typename T >
193 T areEqual( T a, T b, T delta = T( 0 ) )
195 return ( std::fabs( a - b ) <= delta );
198 template<
typename T >
inline int signum(
const T& value )
A line is an ordered sequence of WPositions.
Represents a plane with a normal vector and a position in space.
This only is a 3d double vector.