public double x { get; set; }
public double y { get; set; }
public double vzdalenostBodu(Bod b) {
return Math.Abs(Math.Sqrt(Math.Pow(b.x - this.x, 2) + Math.Pow(b.y - this.y, 2)));
public double uhelBodu(Bod b) {
return Math.Atan2(b.y - this.y, b.x - this.x);
public Bod bodVeVzdalenosti(double vzdalenost, double uhel) {
b.x = vzdalenost * Math.Sin(uhel);
b.y = vzdalenost * Math.Cos(uhel);
public double spotrebaPaliva = 10;
public double stavPaliva { get; set; }
public double rychlost { get; set; }
public double Distance() {
return Math.Abs(Math.Sqrt(Math.Pow(this.bx - this.ax, 2) + Math.Pow(this.by - this.ay, 2)));
public static void Main(string[] args)
x1 = double.Parse(Console.ReadLine());
y1 = double.Parse(Console.ReadLine());
x2 = double.Parse(Console.ReadLine());
y2 = double.Parse(Console.ReadLine());
vzdalenost = Math.Sqrt(Math.Pow(x2 - x1, 2) + Math.Pow(y2 - y1, 2));
Console.WriteLine("Vzdálenost mezi body: '" + vzdalenost + "'");