//计算两个点的角度
double CalculateAngle(Point Mar1Point, Point Mar2Point)
{
double k = (double)(Mar2Point.y - Mar1Point.y) / (Mar2Point.x - Mar1Point.x); //计算斜率
double arcLength1 = atan(k); //弧度
double current_angle = arcLength1 * 180 / PI; //角度
return current_angle;
}
原文:https://www.cnblogs.com/DoublearmyLi/p/14275361.html