aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-21 14:14:04 +0200
committerThomas White <taw@physics.org>2021-07-21 15:34:33 +0200
commitac4198464791af645fc22b23110733f51c0cbc83 (patch)
treeffcd672a6675e7dce4ab1a8e795e9cc94667d168 /libcrystfel/src
parentdab8efaff83c59ddd4d33cecd577bf2aa592eb25 (diff)
safe_khalf: Use NAN instead of 0.0/0.0
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/geometry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index ff6d14c7..49acc777 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -245,7 +245,7 @@ static inline double safe_khalf(const double xl,
const double yl,
const double zl)
{
- if ( zl > 0.0 ) return 0.0/0.0;
+ if ( zl > 0.0 ) return NAN;
return -(xl*xl+yl*yl+zl*zl) / (2.0*zl);
}