Mercurial > hg > octave-shane
changeset 7267:9c6e93b7a3f7
[project @ 2007-12-07 17:03:47 by jwe]
author | jwe |
---|---|
date | Fri, 07 Dec 2007 17:03:48 +0000 |
parents | b42f8f3527a5 |
children | 47e4ebac1bfa |
files | src/ChangeLog src/graphics.cc |
diffstat | 2 files changed, 14 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-12-07 David Bateman <dbateman@free.fr> + + * graphics.cc (check_limit_val): Delete. + (check_limit_vals): Simplify and no longer use check_limit_val. + 2007-12-05 John W. Eaton <jwe@octave.org> * version.h (OCTAVE_VERSION): Now 2.9.18+.
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -1810,28 +1810,18 @@ } static void -check_limit_val (double& min_val, double& max_val, double& min_pos, double val) -{ - if (! (xisinf (val) || xisnan (val))) - { - if (val < min_val) - min_val = val; - - if (val > max_val) - max_val = val; - - if (val > 0 && val < min_pos) - min_pos = val; - } -} - -static void check_limit_vals (double& min_val, double& max_val, double& min_pos, const data_property& data) { - check_limit_val (min_val, max_val, min_pos, data.min_val ()); - check_limit_val (max_val, max_val, min_pos, data.max_val ()); - check_limit_val (min_pos, max_val, min_pos, data.min_pos ()); + double val = data.min_val (); + if (! (xisinf (val) || xisnan (val)) && val < min_val) + min_val = val; + val = data.max_val (); + if (! (xisinf (val) || xisnan (val)) && val > max_val) + max_val = val; + val = data.min_pos (); + if (! (xisinf (val) || xisnan (val)) && val > 0 && val < min_pos) + min_pos = val; } // Attempt to make "nice" limits from the actual max and min of the