public double MapTargetToUnit(double value) { int index = GetIndexFromTarget(value); if (index == -1) { return(double.NaN); } MapperRange range = this.ranges[index].target; return(range.MapToUnit(value)); //return (value - range.From) / range.Length; }
public RangePair(MapperRange source, MapperRange target) { this.source = source; this.target = target; }
public void Add(MapperRange source, MapperRange target) { this.ranges.Add(new RangePair(source, target)); }