/// <summary> /// Rescales array values to their original state. /// </summary> public double Rescale(double value, XYEnum dimension) { switch (dimension) { case XYEnum.X: return((value * _diffX) + _minX); default: return((value * _diffY) + _minY); } }
private double Scale(double value, XYEnum dimension) { double scaledValue; switch (dimension) { case XYEnum.X: scaledValue = (value - _minX) / _diffX; break; default: scaledValue = (value - _minY) / _diffY; break; } return(scaledValue); }