From 489bdd091ea9dae275717e95340a9fdd07dcba8c Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 14 Dec 2006 17:23:17 +0100 Subject: change Projection::comp_params() to allow a variable amount of known mountains --- src/ProjectionTangential.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/ProjectionTangential.cxx') diff --git a/src/ProjectionTangential.cxx b/src/ProjectionTangential.cxx index 8eed552..16488ad 100644 --- a/src/ProjectionTangential.cxx +++ b/src/ProjectionTangential.cxx @@ -29,10 +29,18 @@ comp_tilt(double tan_nick_view, double tan_dir_view, double n_scale, double x, double y, double pi_d); int -ProjectionTangential::comp_params(const Hill *m1, const Hill *m2, ViewParams *parms) { - const Hill *tmp; +ProjectionTangential::comp_params(const Hills *h, ViewParams *parms) { + const Hill *tmp, *m1, *m2; double a_center_tmp, scale_tmp, a_nick_tmp; + if (h->get_num() != 2) { + return 1; + } + + m1 = h->get(0); + m2 = h->get(1); + + scale_tmp = comp_scale(m1->alph, m2->alph, m1->x, m2->x); if (isnan(scale_tmp) || scale_tmp < 100.0) { // try again with mountains swapped -- cgit v1.2.3