private void InitClass(BigInteger value, UndefinedState state)
 {
     Value = value;
     Type  = HierarchyLevel.INTEGER;
     State = state;
     Init();
 }
Esempio n. 2
0
 /// <summary>
 /// Use Number.Create(RealNumber.UndefinedState) instead
 /// </summary>
 /// <param name="state"></param>
 internal RealNumber(UndefinedState state)
 {
     if (state == UndefinedState.DEFINED)
     {
         throw new InvalidOperationException("You cannot define undefined number with defined state");
     }
     InitClass(0, state);
 }
Esempio n. 3
0
        private void InitClass(decimal value, UndefinedState state)
        {
            Value = value;
            Type  = HierarchyLevel.REAL;
            State = state;
            switch (State)
            {
            case UndefinedState.NEGATIVE_INFINITY:
                Value = decimal.MinValue;
                break;

            case UndefinedState.POSITIVE_INFINITY:
                Value = decimal.MaxValue;
                break;

            case UndefinedState.NAN:
                Value = 0;
                break;
            }
            Init();
        }
Esempio n. 4
0
        private void InitClass(EDecimal value, UndefinedState state)
        {
            Value = value;
            Type  = HierarchyLevel.REAL;
            State = state;
            switch (State)
            {
            case UndefinedState.NEGATIVE_INFINITY:
                Value = EDecimal.NegativeInfinity;
                break;

            case UndefinedState.POSITIVE_INFINITY:
                Value = EDecimal.PositiveInfinity;
                break;

            case UndefinedState.NAN:
                Value = 0;
                break;
            }
            Init();
        }