Mercurial > hg > octave-terminal
changeset 14921:972890bc9f38
maint: periodic merge of default to jit
author | Max Brister <max@2bass.com> |
---|---|
date | Sat, 26 May 2012 20:38:17 -0500 |
parents | 51d4b1018efb (current diff) e3da2a68d709 (diff) |
children | 2e6f83b2f2b9 |
files | |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -5928,8 +5928,17 @@ // FIXME -- maybe this test should also be relative? if (std::abs (min_val - max_val) < sqrt (DBL_EPSILON)) { - min_val *= 0.9; - max_val *= 1.1; + // Widen range when too small + if (min_val >= 0) + { + min_val *= 0.9; + max_val *= 1.1; + } + else + { + min_val *= 1.1; + max_val *= 0.9; + } } if (min_val > 0) {