From fb60212a5b779b9f7b14342cf2afa99e50e35f3a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 25 Nov 2022 22:36:19 +0100 Subject: [PATCH] More numerical stability for reproducible tests drcSimpleTests:56 and 57 (45 degree angles) --- src/db/db/dbCellVariants.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/db/dbCellVariants.cc b/src/db/db/dbCellVariants.cc index 97f3c8c0d..c65d1a7a0 100644 --- a/src/db/db/dbCellVariants.cc +++ b/src/db/db/dbCellVariants.cc @@ -52,13 +52,13 @@ db::ICplxTrans OrthogonalTransformationReducer::reduce (const db::ICplxTrans &tr } else { db::ICplxTrans res; double a = trans.angle (); - double a90 = floor (a / 90.0 + 0.5) * 90.0; + double a90 = floor (a / 90.0 + 0.5 + db::epsilon) * 90.0; res.angle (a - a90); return res; } } -db::Trans OrthogonalTransformationReducer::reduce (const db::Trans &trans) const +db::Trans OrthogonalTransformationReducer::reduce (const db::Trans &) const { return db::Trans (); }