From 1fdd992e4c05a198af907c5312f188374e13c57f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 16 Oct 2018 09:50:15 +0200 Subject: Don't use within_tolerance for angles --- src/cell_tool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cell_tool.c') diff --git a/src/cell_tool.c b/src/cell_tool.c index 085134b3..3fd206e9 100644 --- a/src/cell_tool.c +++ b/src/cell_tool.c @@ -88,9 +88,9 @@ static int cells_the_same(UnitCell *cell1, UnitCell *cell2, float ltl, float atl if ( !within_tolerance(a1, a2, ltl) ) return 0; if ( !within_tolerance(b1, b2, ltl) ) return 0; if ( !within_tolerance(c1, c2, ltl) ) return 0; - if ( !within_tolerance(al1, al2, atl) ) return 0; - if ( !within_tolerance(be1, be2, atl) ) return 0; - if ( !within_tolerance(ga1, ga2, atl) ) return 0; + if ( fabs(al1-al2) > atl ) return 0; + if ( fabs(be1-be2) > atl ) return 0; + if ( fabs(ga1-ga2) > atl ) return 0; return 1; } -- cgit v1.2.3