diff options
author | Thomas White <taw@physics.org> | 2018-10-16 09:50:15 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-11 16:49:36 +0100 |
commit | 1fdd992e4c05a198af907c5312f188374e13c57f (patch) | |
tree | 16dfb5def6e6cf90d0f07817ae2c949d10536d7d | |
parent | e06952e9eefb0affb65d5361d1919d28bee5974d (diff) |
Don't use within_tolerance for angles
-rw-r--r-- | src/cell_tool.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |