assert that the decimals parameters of the round repairer is <= 1.0

This commit is contained in:
nojhan 2011-11-17 13:40:26 +01:00
commit e09bb5551b

View file

@ -86,7 +86,11 @@ public:
typedef typename EOT::AtomType ArgType;
//! Generally speaking, we expect decimals being <= 1, but it can work for higher values
edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary<EOT>( edoRound<ArgType>, 1 / decimals ) {}
edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary<EOT>( edoRound<ArgType>, 1 / decimals )
{
assert( decimals <= 1.0 );
assert( 1/decimals >= 1.0 );
}
};