summaryrefslogtreecommitdiff
path: root/src/ProjectionSphaeric.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProjectionSphaeric.cxx')
-rw-r--r--src/ProjectionSphaeric.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ProjectionSphaeric.cxx b/src/ProjectionSphaeric.cxx
index 96af4e0..5227355 100644
--- a/src/ProjectionSphaeric.cxx
+++ b/src/ProjectionSphaeric.cxx
@@ -13,8 +13,8 @@
#define BEST_UNDEF 10000000.0
int
-ProjectionSphaeric::comp_params(const Hill *m1, const Hill *m2, ViewParams *parms) {
- const Hill *m_tmp;
+ProjectionSphaeric::comp_params(const Hills *h, ViewParams *parms) {
+ const Hill *m_tmp, *m1, *m2;
double tmp_x, tmp_y;
double val;
ViewParams best, tmp;
@@ -22,6 +22,14 @@ ProjectionSphaeric::comp_params(const Hill *m1, const Hill *m2, ViewParams *parm
double d_m1_2, d_m2_2, d_m1_m2_2;
int i, j;
+
+ if (h->get_num() != 2) {
+ return 1;
+ }
+
+ m1 = h->get(0);
+ m2 = h->get(1);
+
if (m1->x < m2->x) {
m_tmp = m1;
m1 = m2;