diff --git a/+braidlab/@braid/private/cross2gen.m b/+braidlab/@braid/private/cross2gen.m index c9a737ac..6045ed18 100644 --- a/+braidlab/@braid/private/cross2gen.m +++ b/+braidlab/@braid/private/cross2gen.m @@ -75,12 +75,12 @@ % angle). dXtraj = Xtraj1 - Xtraj2; - % Use absolute precision to test equality (same as C++ code). - nearcoinc = find(eqfuzzy(Xtraj1,Xtraj2,delta)); + % Use absolute precision to test equality. + nearcoinc = find(abs(dXtraj) < delta); if ~isempty(nearcoinc) - % Use absolute precision to test equality (same as C++ code). - if any(eqfuzzy(Ytraj1(nearcoinc),Ytraj2(nearcoinc),delta)) + % Use absolute precision to test equality. + if any(abs(Ytraj1(nearcoinc)-Ytraj2(nearcoinc)) < delta) error('BRAIDLAB:braid:colorbraiding:coincidentparticles', ... mat2str([I J]) ) else diff --git a/+braidlab/@braid/private/eqfuzzy.m b/+braidlab/@braid/private/eqfuzzy.m deleted file mode 100644 index 1fb82020..00000000 --- a/+braidlab/@braid/private/eqfuzzy.m +++ /dev/null @@ -1,31 +0,0 @@ -function result = eqfuzzy(A,B,delta) -%EQFUZZY Check for equality within a given precision. -% EE = EQFUZZY(A,B,DELTA) checks if the elements of A and B are within -% DELTA of each other. Returns a logical array. -% - -% -% Marko Budisic -% -% This file is part of Braidlab. -% -% Braidlab is free software: you can redistribute it and/or modify -% it under the terms of the GNU General Public License as published by -% the Free Software Foundation, either version 3 of the License, or -% (at your option) any later version. -% -% Braidlab is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with Braidlab. If not, see . -% LICENSE> - -result = abs(A-B) < delta;