From e09bb5551bd6160ba0fed79a150f2da13d8e958b Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 17 Nov 2011 13:40:26 +0100 Subject: [PATCH] assert that the decimals parameters of the round repairer is <= 1.0 --- edo/src/edoRepairerRound.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h index c370a03c..a882021c 100644 --- a/edo/src/edoRepairerRound.h +++ b/edo/src/edoRepairerRound.h @@ -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( edoRound, 1 / decimals ) {} + edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary( edoRound, 1 / decimals ) + { + assert( decimals <= 1.0 ); + assert( 1/decimals >= 1.0 ); + } };