diff options
Diffstat (limited to 'src/molecule_posn.c')
-rw-r--r-- | src/molecule_posn.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/molecule_posn.c b/src/molecule_posn.c index 5343795..553a176 100644 --- a/src/molecule_posn.c +++ b/src/molecule_posn.c @@ -175,6 +175,8 @@ static const char *rcsid = "$Header$"; if the grid is smaller than the molecule MOLECULE_POSN_ERROR_NAN if we encounter a NaN or other non-finite floating-point value + MOLECULE_POSN_ERROR_DX_ZERO + if grid_delta == 0.0 @endreturndesc @@*/ int AEILocalInterp_molecule_posn(fp grid_origin, fp grid_delta, @@ -234,9 +236,9 @@ if ( !finite(boundary_off_centering_tolerance_min) || !finite(boundary_extrapolation_tolerance_max) ) then return MOLECULE_POSN_ERROR_NAN; -/* ditto if the grid spacing is zero (we'll need to divide by it)! */ +/* is the grid spacing zero (we'll need to divide by it)? */ if (grid_delta == 0.0) - then return MOLECULE_POSN_ERROR_NAN; + then return MOLECULE_POSN_ERROR_DX_ZERO; /* molecule radia (inherently positive) in +/- directions */ |