Esempio n. 1
0
        public static Tochka operator -(Tochka obj1, Tochka obj2)
        {
            Tochka result = new Tochka();

            result.x = obj1.x - obj2.x;
            result.y = obj1.y - obj2.y;
            return(result);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Tochka   start1 = new Tochka();
            Tochka   end1   = new Tochka(3, 9);
            Tochka   start2 = new Tochka(end1);
            Vidrizok W1     = new Vidrizok(start1, end1);
            Vidrizok W2     = new Vidrizok(start2, 8, 5);
            Vidrizok W3     = new Vidrizok(W2);

            W3.Sdvig(3, 0);
            W3 = W1 + W2;
        }
Esempio n. 3
0
 public Tochka(Tochka obj) : this(obj.x, obj.y)
 {
 }
Esempio n. 4
0
 public void Sdvig(double x, double y)
 {
     this.start = this.start + new Tochka(x, y);
     this.end   = this.end + new Tochka(x, y);
     this.Getdlina();
 }
Esempio n. 5
0
 public Vidrizok(double x1, double y1, Tochka e)
 {
     start = new Tochka(x1, y1);
     end   = e;
     Getdlina();
 }
Esempio n. 6
0
 public Vidrizok(Tochka s, double x2, double y2)
 {
     start = s;
     end   = new Tochka(x2, y2);
     Getdlina();
 }
Esempio n. 7
0
 public Vidrizok(double x1, double y1, double x2, double y2)
 {
     start = new Tochka(x1, y1);
     end   = new Tochka(x2, y2);
     Getdlina();
 }
Esempio n. 8
0
 public Vidrizok(Tochka s, Tochka e)
 {
     start = s;
     end   = e;
     Getdlina();
 }