diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-10-31 22:15:52 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-10-31 22:15:52 +0200 |
commit | ddfb0927f6b01da55bd9e5fb7ccdad82920ed7d2 (patch) | |
tree | 11021b41d9698f87b69e02d628b8234373cdc21a | |
parent | 2e55fcc1dc5f421765e44f5be9f1610f392b8636 (diff) |
only allow reasonable scale values (> 100.0 for now)
-rw-r--r-- | src/ProjectionTangential.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ProjectionTangential.cxx b/src/ProjectionTangential.cxx index a108e25..60feaff 100644 --- a/src/ProjectionTangential.cxx +++ b/src/ProjectionTangential.cxx @@ -49,7 +49,7 @@ ProjectionTangential::comp_params(Hill *m1, Hill *m2, ViewParams *parms) { double a_center_tmp, scale_tmp, a_nick_tmp; scale_tmp = comp_scale(m1->alph, m2->alph, m1->x, m2->x); - if (isnan(scale_tmp) || scale_tmp < 0.0) { + if (isnan(scale_tmp) || scale_tmp < 100.0) { // try again with mountains swapped tmp = m1; m1 = m2; @@ -62,7 +62,7 @@ ProjectionTangential::comp_params(Hill *m1, Hill *m2, ViewParams *parms) { (parms->scale - m1->y * tan(m1->a_nick))); if (isnan(a_center_tmp) || isnan(scale_tmp) || - scale_tmp < 0.0 || isnan(a_nick_tmp)) { + scale_tmp < 100.0 || isnan(a_nick_tmp)) { return 1; } else { |