public static Ratio Simplification(Ratio x) { int temp = MyMetods.NOD(x.m, x.n); if (temp != 1) { return(new Ratio(x.m / temp, x.n / temp)); } else { return(x); } //else return new Ratio(x.m, x.n); }