Mercurial > hg > octave-nkf
changeset 19830:884e0c55d92c
Fix complex compare operation for issorted (bug #44071).
* Array-C.cc (nan_ascending_compare, nan_descending_compare): Fix typo where
comparison was made between x and x rather than between x and y.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 26 Jan 2015 15:32:49 -0800 |
parents | e68267373191 |
children | d9c0b08e3da6 |
files | liboctave/array/Array-C.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/Array-C.cc +++ b/liboctave/array/Array-C.cc @@ -46,8 +46,8 @@ { return (xisnan (y) ? ! xisnan (x) - : ((std::abs (x) < std::abs (x)) - || ((std::abs (x) == std::abs (x)) && (arg (x) < arg (x))))); + : ((std::abs (x) < std::abs (y)) + || ((std::abs (x) == std::abs (y)) && (arg (x) < arg (y))))); } static bool @@ -55,8 +55,8 @@ { return (xisnan (x) ? ! xisnan (y) - : ((std::abs (x) > std::abs (x)) - || ((std::abs (x) == std::abs (x)) && (arg (x) > arg (x))))); + : ((std::abs (x) > std::abs (y)) + || ((std::abs (x) == std::abs (y)) && (arg (x) > arg (y))))); } Array<Complex>::compare_fcn_type