Исправление: замена табуляций на пробелы

This commit is contained in:
Andrey Pokidov 2024-11-20 13:32:50 +07:00
parent ebb0a73555
commit aafe4e9075
4 changed files with 80 additions and 80 deletions

View file

@ -193,33 +193,33 @@ namespace BGC
public static double GetAngle(in FP64Vector2 vector1, in FP64Vector2 vector2, AngleUnit unit)
{
double squareModule1 = vector1.GetSquareModule();
double squareModule1 = vector1.GetSquareModule();
if (squareModule1 <= FP64Utility.SQUARE_EPSYLON)
{
return 0.0;
}
double squareModule2 = vector2.GetSquareModule();
if (squareModule2 <= FP64Utility.SQUARE_EPSYLON)
{
return 0.0;
}
double cosine = FP64Vector2.GetScalarProduct(vector1, vector2) / Math.Sqrt(squareModule1 * squareModule2);
if (1.0 - FP64Utility.EPSYLON <= cosine)
if (squareModule1 <= FP64Utility.SQUARE_EPSYLON)
{
return 0.0;
}
}
if (cosine <= -(1.0 - FP64Utility.EPSYLON))
double squareModule2 = vector2.GetSquareModule();
if (squareModule2 <= FP64Utility.SQUARE_EPSYLON)
{
return 0.0;
}
double cosine = FP64Vector2.GetScalarProduct(vector1, vector2) / Math.Sqrt(squareModule1 * squareModule2);
if (1.0 - FP64Utility.EPSYLON <= cosine)
{
return 0.0;
}
if (cosine <= -(1.0 - FP64Utility.EPSYLON))
{
return FP64Angle.GetHalfCircle(unit);
}
}
return FP64Radians.ToUnits(Math.Acos(cosine), unit);
return FP64Radians.ToUnits(Math.Acos(cosine), unit);
}
public static double GetSquareDistance(in FP64Vector2 vector1, in FP64Vector2 vector2)