Guard against casting a double NaN to an int.  We don't care what value is returned; however, reportedly, a program can crash in this case, see
Guard against casting a double NaN to an int.  We don't care what value
is returned; however, reportedly, a program can crash in this case, see

  https://github.com/OSGeo/proj.4/issues/843

At present, the fix is only in place for the C library.  Still need to
handle other cases of float -> int conversion.  (A check already in
place in the python library.)

geographiclib/geographiclib,geographiclib/geographiclib,geographiclib/geographiclib,geographiclib/geographiclib