const FVector2D& Pt1 = 第一个点的位置;
const FVector2D& Pt2 = 第二个点的位置;
float EdgeRadians1 = FMath::Atan2(Pt2.Y - Pt1.Y, Pt2.X - Pt1.X);
const FVector2D& PP1 = 第二个点的位置;
const FVector2D& PP2 = 第三个点的位置;
float EdgeRadians2 = FMath::Atan2(PP2.Y - PP1.Y, PP2.X - PP1.X);
float Angle1 = Math2d::GetNormlizeDegress(-FMath::RadiansToDegrees(EdgeRadians1));
float Angle2 = Math2d::GetNormlizeDegress(180.0F - FMath::RadiansToDegrees(EdgeRadians2));
float Angle = Math2d::GetNormlizeDegress(Angle1 - Angle2); //角度
时间: 2024-11-03 14:49:17