swiss ok, needs more benchmark

This commit is contained in:
Youmu Liu
2026-03-06 18:22:30 +08:00
parent 83997f64d0
commit f6e897ed06
70 changed files with 1889 additions and 3371 deletions
@@ -32,15 +32,21 @@ namespace StgSharp.Mathematics.Graphics
public static unsafe partial class Linear
{
public static float GetAngle(Vec2 vec1, Vec2 vec2)
public static float GetAngle(
Vec2 vec1,
Vec2 vec2
)
{
return Scalar.ACos(
return MathF.Acos(
1 / (vec1.GetLength() * vec2.GetLength()));
}
public static float GetAngle(Vec3 vec1, Vec3 vec2)
public static float GetAngle(
Vec3 vec1,
Vec3 vec2
)
{
return Scalar.ACos((vec1 * vec2) / (vec1.GetLength() * vec2.GetLength()));
return MathF.Acos(vec1 * vec2 / (vec1.GetLength() * vec2.GetLength()));
}
}