diff options
author | Thomas White <taw@physics.org> | 2019-08-09 17:27:24 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-08-16 10:26:58 +0200 |
commit | 303beb15791ee60f7cfec4db4b19d0544e662586 (patch) | |
tree | dd19d531f96103f828b715f99cecd3a3372dd9ba /libcrystfel/src | |
parent | 89dbd2980be6eed5c6b2a73813384c27db9830d3 (diff) |
rtnl_list: Accept gdc(num,den) = -1 as well
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/rational.c b/libcrystfel/src/rational.c index 5138c3e9..335685e0 100644 --- a/libcrystfel/src/rational.c +++ b/libcrystfel/src/rational.c @@ -236,7 +236,7 @@ Rational *rtnl_list(signed int num_min, signed int num_max, if ( (n>0) && (rtnl_cmp(list[n-1], r)==0) ) continue; /* Can be reduced? */ - if ( gcd(num, den) != 1 ) continue; + if ( abs(gcd(num, den)) != 1 ) continue; list[n++] = r; } |