Added proper scaling for derivatives

This commit is contained in:
André R. Brodtkorb
2015-08-05 14:52:13 +02:00
committed by babrodtk
parent 99c23d3810
commit 66c13d9b96
2 changed files with 12 additions and 8 deletions

View File

@@ -280,9 +280,10 @@ private:
* Helper struct for linear interpolation
*/
struct InterpData {
InterpData() : ind_{0, 0}, factor_(0.0) {}
InterpData() : ind_{0, 0}, inv_dist_(0.0), factor_(0.0) {}
int ind_[2]; //[First element greater than or equal to value, Last element smaller than or equal to value]
double factor_; //Interpolation factor
double inv_dist_; // 1 / distance between the two end points of the segment. Used to calculate derivatives and uses 1.0 / 0.0 = 0.0 as a convention
double factor_; // Interpolation factor
};
/**