Go to the source code of this file.
| #define mCenterImpl |
( |
|
func, |
|
|
|
typ |
|
) |
| |
Value:template <class T> inline \
{ return ((typ)(start+stop))/2; }
Base class for Interval. Has no virtual functions and can hence be used in places where no virtual fu...
Definition: ranges.h:29
| #define mDefFltisCompat |
( |
|
typ, |
|
|
|
releps |
|
) |
| |
Value:template <> \
float eps ) const \
{ \
const typ castedeps = (typ) eps; \
if ( !
mIsEqual(step,b.step, castedeps) ) return false; \
\
typ nrsteps = (start - b.start) / step; \
const
int nrstepsi =
mNINT32( nrsteps ); \
if ( !nrstepsi ) \
mIsZero(start,releps) ? releps : start * releps ); \
\
typ reldiff = (nrsteps - nrstepsi) / nrsteps; \
return ( (reldiff) < (releps) && (reldiff) > (-releps) ); \
}
#define mIsZero(x, eps)
Definition: commondefs.h:55
#define mIsEqual(x, y, eps)
Definition: commondefs.h:56
#define mNINT32(x)
Definition: commondefs.h:48
Interval with step.
Definition: commontypes.h:29
bool isCompatible(const StepInterval< T > &, float eps=(1e-10)) const
Definition: ranges.h:781
| #define mDefFNrSteps |
( |
|
typ | ) |
|
Value:template <> \
{ \
if ( !step ) return 0; \
typ ns = ( (start > stop ? start : stop) \
- (start > stop ? stop : start) ) \
/ (step > 0 ? step : -step); \
}
int nrSteps() const
Definition: ranges.h:758
#define mNINT32(x)
Definition: commondefs.h:48
template<class T1 , class T2 >
template<class T1 , class T2 >