19
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
var (point1X, point1Y) = (5, 5);
8
var (point2X, point2Y) = (4, 4);
9
10
float deltaX = point2X - point1X;
11
float deltaY = point2Y - point1Y;
12
float distanceSquared = deltaX * deltaX + deltaY * deltaY;
13
float distance = (float)Math.Sqrt(distanceSquared);
14
float raidantAngle = (float)Math.Atan2(deltaX, deltaY);
15
float angle = raidantAngle * 180 / (float)Math.PI;
16
17
Console.WriteLine(distance + " " + angle);
18
}
19
}
Cached Result
Compilation error (line 50, col 35): Invalid expression term 'return'
Compilation error (line 50, col 35): ; expected
Compilation error (line 50, col 45): 'int' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?)
Compilation error (line 50, col 59): 'int' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?)
Compilation error (line 11, col 11): The variable 'b' is assigned but its value is never used
Compilation error (line 50, col 35): ; expected
Compilation error (line 50, col 45): 'int' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?)
Compilation error (line 50, col 59): 'int' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?)
Compilation error (line 11, col 11): The variable 'b' is assigned but its value is never used