From 7bd2ccbee4bc7d44b691022a44ddecf5d91e5d2b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 25 Apr 2012 22:29:17 -0400 Subject: [PATCH] Fixed bug in checking the maximum X value --- src/interpolate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interpolate.cpp b/src/interpolate.cpp index 3693b4e..d9e3e4f 100644 --- a/src/interpolate.cpp +++ b/src/interpolate.cpp @@ -107,7 +107,10 @@ const Interpolate& Interpolate::operator=(const Interpolate& a) double Interpolate::getMaxX() const { - return exp(spline->x[spline->size-1]); + if (logx) + return exp(spline->x[spline->size-1]); + else + return spline->x[spline->size-1]; } typedef struct {