Beispiel #1
0
 public void SetRange2(double left, double right)
 {
     AssertValidRange(left, right);
     Value2Left  = left;
     Value2Right = right;
     v2Direction = right > left;
     reverseMap  = IsSameDirection();
     Range2      = ValueInterval.CloseClose(Math.Min(right, left), Math.Max(right, left));
     CalculateRatos();
 }
Beispiel #2
0
        public ValueMapper(double value1Left, double value1Right, double value2Left, double value2Right)
        {
            Value1Left  = value1Left;
            Value2Left  = value2Left;
            Value1Right = value1Right;
            Value2Right = value2Right;
            //如果两组数据的left-->right的方向不一样,则作对称映射
            //不用考虑相等的情况,如果left和right相等,new ValueRange会抛出异常
            v1Direction = value1Right > value1Left;
            v2Direction = value2Right > value2Left;
            reverseMap  = IsSameDirection();

            Range1 = ValueInterval.CloseClose(Math.Min(value1Right, value1Left), Math.Max(value1Right, value1Left));
            Range2 = ValueInterval.CloseClose(Math.Min(value2Right, value2Left), Math.Max(value2Right, value2Left));
            CalculateRatos();
        }
Beispiel #3
0
 public DoubleStrInRange(double max, double min) : this(ValueInterval.CloseClose(max, min))
 {
 }
Beispiel #4
0
 public IntStrInRange(int max, int min) : this(ValueInterval.CloseClose(max, min))
 {
 }
Beispiel #5
0
 public IntStrInRange(int min, int max) : this(ValueInterval.CloseClose(min, max))
 {
 }
 public DoubleStrInRange(double min, double max) : this(ValueInterval.CloseClose(min, max))
 {
 }