aboutsummaryrefslogtreecommitdiff
path: root/src/cell_tool.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-10-16 09:50:15 +0200
committerThomas White <taw@physics.org>2019-03-11 16:49:36 +0100
commit1fdd992e4c05a198af907c5312f188374e13c57f (patch)
tree16dfb5def6e6cf90d0f07817ae2c949d10536d7d /src/cell_tool.c
parente06952e9eefb0affb65d5361d1919d28bee5974d (diff)
Don't use within_tolerance for angles
Diffstat (limited to 'src/cell_tool.c')
-rw-r--r--src/cell_tool.c6
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;
}