예제 #1
0
        public void SegmentDouble_Shift()
        {
            SegmentDouble segmentMax = new SegmentDouble(double.MinValue, double.MaxValue);

            Panel_InterfaceSegment <double, double> .ShiftMax(segmentMax, 1.0);

            Panel_InterfaceSegment <double, double> .ShiftMax(segmentMax, -1.0);

            SegmentDouble segmentLeftMin  = new SegmentDouble(double.MinValue, double.MaxValue - 1.0);
            SegmentDouble segmentRightMax = new SegmentDouble(double.MinValue + 1.0, double.MaxValue);

            Panel_InterfaceSegment <double, double> .Shift(segmentLeftMin, 1.0, segmentRightMax);

            Panel_InterfaceSegment <double, double> .Shift(segmentRightMax, -2.0, segmentLeftMin);
        }
예제 #2
0
        public void SegmentInt_Shift()
        {
            SegmentInt segmentMax = new SegmentInt(Int32.MinValue, Int32.MaxValue);

            Panel_InterfaceSegment <Int32, Int32> .ShiftMax(segmentMax, 1);

            Panel_InterfaceSegment <Int32, Int32> .ShiftMax(segmentMax, -1);

            SegmentInt segmentLeftMin  = new SegmentInt(Int32.MinValue, Int32.MaxValue - 1);
            SegmentInt segmentRightMax = new SegmentInt(Int32.MinValue + 1, Int32.MaxValue);

            Panel_InterfaceSegment <Int32, Int32> .Shift(segmentLeftMin, 1, segmentRightMax);

            Panel_InterfaceSegment <Int32, Int32> .Shift(segmentRightMax, -2, segmentLeftMin);
        }
예제 #3
0
        public void SegmentTime_Shift()
        {
            TimeSpan    one        = new TimeSpan(1);
            TimeSpan    two        = new TimeSpan(2);
            SegmentTime segmentMax = new SegmentTime(DateTime.MinValue, DateTime.MaxValue);

            Panel_InterfaceSegment <DateTime, TimeSpan> .ShiftMax(segmentMax, one);

            Panel_InterfaceSegment <DateTime, TimeSpan> .ShiftMax(segmentMax, one.Negate());

            SegmentTime segmentLeftMin  = new SegmentTime(DateTime.MinValue, DateTime.MaxValue - one);
            SegmentTime segmentRightMax = new SegmentTime(DateTime.MinValue + one, DateTime.MaxValue);

            Panel_InterfaceSegment <DateTime, TimeSpan> .Shift(segmentLeftMin, one, segmentRightMax);

            Panel_InterfaceSegment <DateTime, TimeSpan> .Shift(segmentRightMax, two.Negate(), segmentLeftMin);
        }