public Fraction FractReduct() { long nsd = DopClass.NSD(Numerator, Denominator); Fraction fractNew = new Fraction(Numerator / nsd, Denominator / nsd); return(fractNew); }
public static Fraction operator /(Fraction fract1, Fraction fract2) { long numeration = fract1.Numerator * fract2.Denominator; long denominator = fract1.Denominator * fract2.Numerator; long nsd = DopClass.NSD(numeration, denominator); numeration /= nsd; denominator /= nsd; return(new Fraction(numeration, denominator)); }