diff --git a/src/DotRecast.Detour/DtNavMeshQuery.cs b/src/DotRecast.Detour/DtNavMeshQuery.cs index 2decd95..9eca19b 100644 --- a/src/DotRecast.Detour/DtNavMeshQuery.cs +++ b/src/DotRecast.Detour/DtNavMeshQuery.cs @@ -287,7 +287,7 @@ namespace DotRecast.Detour Array.Copy(bestTile.data.verts, bestPoly.verts[j] * 3, polyVerts, j * 3, 3); } - float[] constrainedVerts = constraint.Aply(polyVerts, centerPos, maxRadius); + float[] constrainedVerts = constraint.Apply(polyVerts, centerPos, maxRadius); if (constrainedVerts != null) { int vertCount = constrainedVerts.Length / 3; diff --git a/src/DotRecast.Detour/IPolygonByCircleConstraint.cs b/src/DotRecast.Detour/IPolygonByCircleConstraint.cs index 03a2960..4855429 100644 --- a/src/DotRecast.Detour/IPolygonByCircleConstraint.cs +++ b/src/DotRecast.Detour/IPolygonByCircleConstraint.cs @@ -23,6 +23,6 @@ namespace DotRecast.Detour { public interface IPolygonByCircleConstraint { - float[] Aply(float[] polyVerts, RcVec3f circleCenter, float radius); + float[] Apply(float[] polyVerts, RcVec3f circleCenter, float radius); } } \ No newline at end of file diff --git a/src/DotRecast.Detour/NoOpPolygonByCircleConstraint.cs b/src/DotRecast.Detour/NoOpPolygonByCircleConstraint.cs index 5599b84..2238024 100644 --- a/src/DotRecast.Detour/NoOpPolygonByCircleConstraint.cs +++ b/src/DotRecast.Detour/NoOpPolygonByCircleConstraint.cs @@ -10,7 +10,7 @@ namespace DotRecast.Detour { } - public float[] Aply(float[] polyVerts, RcVec3f circleCenter, float radius) + public float[] Apply(float[] polyVerts, RcVec3f circleCenter, float radius) { return polyVerts; } diff --git a/src/DotRecast.Detour/StrictPolygonByCircleConstraint.cs b/src/DotRecast.Detour/StrictPolygonByCircleConstraint.cs index cb09e99..0ced034 100644 --- a/src/DotRecast.Detour/StrictPolygonByCircleConstraint.cs +++ b/src/DotRecast.Detour/StrictPolygonByCircleConstraint.cs @@ -31,7 +31,7 @@ namespace DotRecast.Detour return temp; } - public float[] Aply(float[] verts, RcVec3f center, float radius) + public float[] Apply(float[] verts, RcVec3f center, float radius) { float radiusSqr = radius * radius; int outsideVertex = -1; diff --git a/test/DotRecast.Detour.Test/PolygonByCircleConstraintTest.cs b/test/DotRecast.Detour.Test/PolygonByCircleConstraintTest.cs index f6b3b68..df356ac 100644 --- a/test/DotRecast.Detour.Test/PolygonByCircleConstraintTest.cs +++ b/test/DotRecast.Detour.Test/PolygonByCircleConstraintTest.cs @@ -31,7 +31,7 @@ public class PolygonByCircleConstraintTest { float[] polygon = { -2, 0, 2, 2, 0, 2, 2, 0, -2, -2, 0, -2 }; RcVec3f center = RcVec3f.Of(1, 0, 1); - float[] constrained = _constraint.Aply(polygon, center, 6); + float[] constrained = _constraint.Apply(polygon, center, 6); Assert.That(constrained, Is.EqualTo(polygon)); } @@ -43,7 +43,7 @@ public class PolygonByCircleConstraintTest float[] polygon = { -2, 0, 2, 2, 0, 2, 2, 0, -2, -2, 0, -2 }; RcVec3f center = RcVec3f.Of(2, 0, 0); - float[] constrained = _constraint.Aply(polygon, center, 3); + float[] constrained = _constraint.Apply(polygon, center, 3); Assert.That(constrained.Length, Is.EqualTo(expectedSize)); Assert.That(constrained, Is.SupersetOf(new[] { 2f, 0f, 2f, 2f, 0f, -2f })); } @@ -54,7 +54,7 @@ public class PolygonByCircleConstraintTest int expectedSize = 12 * 3; float[] polygon = { -4, 0, 0, -3, 0, 3, 2, 0, 3, 3, 0, -3, -2, 0, -4 }; RcVec3f center = RcVec3f.Of(-1, 0, -1); - float[] constrained = _constraint.Aply(polygon, center, 2); + float[] constrained = _constraint.Apply(polygon, center, 2); Assert.That(constrained.Length, Is.EqualTo(expectedSize)); @@ -72,7 +72,7 @@ public class PolygonByCircleConstraintTest int expectedSize = 9 * 3; float[] polygon = { -4, 0, 0, -3, 0, 3, 2, 0, 3, 3, 0, -3, -2, 0, -4 }; RcVec3f center = RcVec3f.Of(-2, 0, -1); - float[] constrained = _constraint.Aply(polygon, center, 3); + float[] constrained = _constraint.Apply(polygon, center, 3); Assert.That(constrained.Length, Is.EqualTo(expectedSize)); Assert.That(constrained, Is.SupersetOf(new[] { -2f, 0f, -4f, -4f, 0f, 0f, -3.4641016f, 0.0f, 1.6076951f, -2.0f, 0.0f, 2.0f })); @@ -84,7 +84,7 @@ public class PolygonByCircleConstraintTest int expectedSize = 7 * 3; float[] polygon = { -4, 0, 0, -3, 0, 3, 2, 0, 3, 3, 0, -3, -2, 0, -4 }; RcVec3f center = RcVec3f.Of(4, 0, 0); - float[] constrained = _constraint.Aply(polygon, center, 4); + float[] constrained = _constraint.Apply(polygon, center, 4); Assert.That(constrained.Length, Is.EqualTo(expectedSize)); Assert.That(constrained, Is.SupersetOf(new[] { 1.5358982f, 0f, 3f, 2f, 0f, 3f, 3f, 0f, -3f }));