public Fraction(string strValue) { Fraction temp = ToFraction(strValue); Initialize(temp.Numerator, temp.Denominator); }
public static MatrixClass operator /(MatrixClass MatrixClass1, Fraction frac) { return(MatrixClass.Multiply(MatrixClass1, Fraction.Inverse(frac))); }
public Fraction(double dDecimalValue) { Fraction temp = ToFraction(dDecimalValue); Initialize(temp.Numerator, temp.Denominator); }
public static MatrixClass operator /(MatrixClass MatrixClass1, int iNo) { return(MatrixClass.Multiply(MatrixClass1, Fraction.Inverse(new Fraction(iNo)))); }
public static MatrixClass operator /(MatrixClass MatrixClass1, double dbl) { return(MatrixClass.Multiply(MatrixClass1, Fraction.Inverse(Fraction.ToFraction(dbl)))); }
/// <summary> /// The function multiplies the given row of the current MatrixClass object by a double /// </summary> public void MultiplyRow(int iRow, double dbl) { this.MultiplyRow(iRow, Fraction.ToFraction(dbl)); }
public static MatrixClass operator *(double dbl, MatrixClass MatrixClass1) { return(MatrixClass.Multiply(MatrixClass1, Fraction.ToFraction(dbl))); }
public static Fraction operator /(Fraction frac1, double dbl) { return(Multiply(frac1, Fraction.Inverse(Fraction.ToFraction(dbl)))); }
/// <summary> /// checks whether two fractions are equal /// </summary> public override bool Equals(object obj) { Fraction frac = (Fraction)obj; return(Numerator == frac.Numerator && Denominator == frac.Denominator); }
public static Fraction operator /(double dbl, Fraction frac1) { return(Multiply(Inverse(frac1), Fraction.ToFraction(dbl))); }
public static Fraction operator *(double dbl, Fraction frac1) { return(Multiply(frac1, Fraction.ToFraction(dbl))); }
public static Fraction operator -(Fraction frac1, double dbl) { return(Add(frac1, -Fraction.ToFraction(dbl))); }
public static Fraction operator -(double dbl, Fraction frac1) { return(Add(-frac1, Fraction.ToFraction(dbl))); }
/// <summary> /// The function takes a Fraction object and returns its value as double /// </summary> public static double ToDouble(Fraction frac) { return((double)frac.Numerator / frac.Denominator); }