Exemple #1
0
        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;
        }
Exemple #2
0
 public RangePair(MapperRange source, MapperRange target)
 {
     this.source = source;
     this.target = target;
 }
Exemple #3
0
 public void Add(MapperRange source, MapperRange target)
 {
     this.ranges.Add(new RangePair(source, target));
 }