Mercurial > octave
diff libinterp/octave-value/ov-base.cc @ 21782:2aef506f3fec
use namespace for lo-mappers.h functions
* lo-mappers.h, lo-mappers.cc (acos, arg, asin, atan, ceil, conj,
copysign, exp2, finite, fix, floor, imag, is_NA, is_NaN_or_NA, isinf,
isinteger, isnan, log2, max, min, mod, negative_sign, nint, nint_big,
positive_sign, rc_acos, rc_acosh, rc_asin, rc_atanh, rc_log, rc_log10,
rc_log2, rc_sqrt, real, rem, round, roundb, signbit, signum, trunc,
x_nint): Define in octave::math namespace. Deprecate old names.
Change all uses.
* oct-inttypes.h: Put round and isnan functions in octave::math
namespace and rename from xround and xisnan. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 May 2016 16:51:16 -0400 |
parents | c4ab2e54f100 |
children | 112b20240c87 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.cc Fri May 27 10:20:48 2016 -0400 +++ b/libinterp/octave-value/ov-base.cc Wed May 25 16:51:16 2016 -0400 @@ -451,14 +451,14 @@ err_wrong_type_arg (e, "octave_base_value::" #F "_value ()", type_name ()); \ } \ \ - if (require_int && D_NINT (d) != d) \ + if (require_int && octave::math::x_nint (d) != d) \ error_with_cfn ("conversion of %g to " #T " value failed", d); \ else if (d < std::numeric_limits<T>::min ()) \ retval = std::numeric_limits<T>::min (); \ else if (d > std::numeric_limits<T>::max ()) \ retval = std::numeric_limits<T>::max (); \ else \ - retval = static_cast<T> (::fix (d)); \ + retval = static_cast<T> (octave::math::fix (d)); \ \ return retval; \ } @@ -489,10 +489,10 @@ err_wrong_type_arg (e, "octave_base_value::nint_value ()", type_name ()); } - if (xisnan (d)) + if (octave::math::isnan (d)) error ("conversion of NaN to integer value failed"); - return static_cast<int> (::fix (d)); + return static_cast<int> (octave::math::fix (d)); } double