Пример #1
0
        private static void Main(string[] args)
        {
            ProtonsPoint p      = ReadPoint();
            ProtonsPoint otherP = ReadPoint();

            Console.WriteLine(p.Distance(otherP));

            p.MoveTo(5, 78);
            Console.WriteLine(p.TransformToString());

            Console.ReadKey();
        }
Пример #2
0
 public double Slope(ProtonsPoint anotherP)
 {
     return((this.y - anotherP.y) / (this.x - anotherP.x));
 }
Пример #3
0
 public double Distance(ProtonsPoint anotherP)
 {
     return(Math.Sqrt(Math.Pow(this.x - anotherP.x, 2)
                      + Math.Pow(this.y - anotherP.y, 2)));
 }