/// <summary> /// Returns the value of compressed number in another form. /// </summary> /// <param name="minValue">The minimum value the number can hold.</param> /// <param name="maxValue">The maximum value the number can hold.</param> public TSource GetValue(TSourceNumber minValue, TSourceNumber maxValue) { maxValue = (TSourceNumber)maxValue.FromDouble(maxValue.AsDouble() - minValue.AsDouble()); var result = NumberCompressor <TDestination, TDestinationNumber> .Decompress <TSource, TSourceNumber>(Value, maxValue); return(result.FromDouble(result.AsDouble() + minValue.AsDouble()).Value); }
/// <summary> /// Returns the value of compressed number in another form. /// </summary> /// <param name="maxValue">The maximum value the number can hold.</param> public TSource GetValue(TSourceNumber maxValue) { return(NumberCompressor <TDestination, TDestinationNumber> .Decompress <TSource, TSourceNumber>(Value, maxValue).Value); }