Mercurial > hg > octave-terminal
changeset 4984:98e4b7da360a
[project @ 2004-09-10 14:02:41 by jwe]
author | jwe |
---|---|
date | Fri, 10 Sep 2004 14:02:41 +0000 |
parents | 13aaef87cf18 |
children | 39df5a9c7b8e |
files | liboctave/lo-mappers.cc |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/lo-mappers.cc +++ b/liboctave/lo-mappers.cc @@ -79,10 +79,10 @@ double xround (double x) { -#if defined HAVE_ROUND +#if defined (HAVE_ROUND) return round (x); #else - return (x < 0 ? ceil (x - 0.5) : floor (x + 0.5); + return x > 0 ? floor (x + 0.5) : ceil (x - 0.5); #endif } @@ -90,6 +90,7 @@ signum (double x) { double tmp = 0.0; + if (x < 0.0) tmp = -1.0; else if (x > 0.0)