Exemple #1
0
        public Phanso Tru(Phanso b)
        {
            Phanso tru = new Phanso();

            tru.ts = this.ts * b.ms - b.ts * this.ms;
            tru.ms = this.ms + b.ms;
            tru.ToiGian();
            return(tru);
        }
Exemple #2
0
        public Phanso Cong(Phanso b)
        {
            Phanso tong = new Phanso();

            tong.ts = this.ts * b.ms + b.ts * this.ms;
            tong.ms = this.ms + b.ms;
            tong.ToiGian();
            return(tong);
        }
Exemple #3
0
        public static Phanso operator -(Phanso t1, Phanso t2)
        {
            Phanso tru = new Phanso();

            tru.ts = t1.ts * t2.ms - t2.ts * t1.ms;
            tru.ms = t2.ms * t1.ms;
            tru.ToiGian();
            return(tru);
        }
Exemple #4
0
        public static Phanso operator +(Phanso t1, Phanso t2)
        {
            Phanso tong = new Phanso();

            tong.ts = t1.ts * t2.ms + t2.ts * t1.ms;
            tong.ms = t2.ms * t1.ms;
            tong.ToiGian();
            return(tong);
        }