Skip to content

Commit

Permalink
Removed RcVecUtils.Dot2D(this RcVec3f @this, Span<float> v, int vi)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Jun 8, 2024
1 parent fd03f0f commit 320c7b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Changed to reuse samples and edges list in BuildPolyDetail()

### Removed
- Removed RcMeshDetails.VdistSq2(float[], float[])
- Removed RcVecUtils.Dot()
- Removed RcVecUtils.Scale()
- Removed RcVecUtils.Subtract(RcVec3f i, float[] verts, int j)
- Removed RcVecUtils.Subtract(float[] verts, int i, int j)
- Removed RcMeshDetails.VdistSq2(float[], float[])
- Removed RcVecUtils.Min(), RcVecUtils.Max()
- Removed RcVecUtils.Create(float[] values)
- Removed RcVecUtils.Dot2D(this RcVec3f @this, Span<float> v, int vi)

### Special Thanks
- [@Doprez](https://github.com/Doprez)
Expand Down
7 changes: 0 additions & 7 deletions src/DotRecast.Core/Numerics/RcVecUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ public static float Dot2D(this RcVec3f @this, RcVec3f v)
@this.Z * v.Z;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Dot2D(this RcVec3f @this, Span<float> v, int vi)
{
return @this.X * v[vi] +
@this.Z * v[vi + 2];
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Cross(float[] dest, float[] v1, float[] v2)
{
Expand Down
4 changes: 2 additions & 2 deletions src/DotRecast.Detour/DtUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ public static bool ClosestHeightPointTriangle(RcVec3f p, RcVec3f a, RcVec3f b, R
public static RcVec2f ProjectPoly(RcVec3f axis, Span<float> poly, int npoly)
{
float rmin, rmax;
rmin = rmax = axis.Dot2D(poly, 0);
rmin = rmax = axis.Dot2D(new RcVec3f(poly));
for (int i = 1; i < npoly; ++i)
{
float d = axis.Dot2D(poly, i * 3);
float d = axis.Dot2D(RcVecUtils.Create(poly, i * 3));
rmin = Math.Min(rmin, d);
rmax = Math.Max(rmax, d);
}
Expand Down

0 comments on commit 320c7b4

Please sign in to comment.