]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/srs/projections/impl/aasincos.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / srs / projections / impl / aasincos.hpp
index 4678029bc057af6d604048279c4bf5f365b91c3b..b12b5f65ba8d7c4851e81393a086c881747211ce 100644 (file)
@@ -3,6 +3,10 @@
 
 // Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
+// This file was modified by Oracle on 2018.
+// Modifications copyright (c) 2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -38,6 +42,8 @@
 
 #include <cmath>
 
+#include <boost/geometry/srs/projections/exception.hpp>
+#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
 #include <boost/geometry/util/math.hpp>
 
 
@@ -66,7 +72,7 @@ inline T aasin(T const& v)
     {
         if (av > aasincos::ONE_TOL<T>())
         {
-            BOOST_THROW_EXCEPTION( projection_exception(-19) );
+            BOOST_THROW_EXCEPTION( projection_exception(error_acos_asin_arg_too_large) );
         }
         return (v < 0.0 ? -geometry::math::half_pi<T>() : geometry::math::half_pi<T>());
     }
@@ -83,7 +89,7 @@ inline T aacos(T const& v)
     {
         if (av > aasincos::ONE_TOL<T>())
         {
-            BOOST_THROW_EXCEPTION( projection_exception(-19) );
+            BOOST_THROW_EXCEPTION( projection_exception(error_acos_asin_arg_too_large) );
         }
         return (v < 0.0 ? geometry::math::pi<T>() : 0.0);
     }