111,094
社区成员




Console.WriteLine(Math.Atan2(1, 0) * 180 / Math.PI); //90
Console.WriteLine(Math.Atan2(1, 0.001) * 180 / Math.PI); //89.9427042395855
int theta = 0;
if (x == 0)
{
if (y > 0)
theta = 90;
if (y < 0)
theta = 270;
}
else
{
double tan = y / x;
theta = Math.Actan(tan) * 180 / Math.PI; // tan的反函数名称自己查
}