Ejemplo n.º 1
0
        /// <summary>Fraction</summary>
        public void InitFraction(int numerator, int denominator)
        {
            this.numerator      = new Value(numerator, Restrictions.dontSetToFraction);
            this.denominator    = new Value(denominator, Restrictions.dontSetToFraction);
            this.deciValue      = ((double)numerator / denominator);
            this.primaryNumType = NumberType.fractional;

            rational = new MathNet.Numerics.Rational(numerator, denominator);
        }
Ejemplo n.º 2
0
        /// <summary>Fraction</summary>
        public void InitFraction(int numerator, int denominator)
        {
            this.numerator = new Value(numerator, Restrictions.dontSetToFraction);
            this.denominator = new Value(denominator, Restrictions.dontSetToFraction);
            this.deciValue = ((double)numerator / denominator);
            this.primaryNumType = NumberType.fractional;

            rational = new MathNet.Numerics.Rational(numerator, denominator);
        }