diff --git a/src/DotRecast.Detour.Extras/DtPolyUtils.cs b/src/DotRecast.Detour.Extras/DtPolyUtils.cs index 53b581b..5f11915 100644 --- a/src/DotRecast.Detour.Extras/DtPolyUtils.cs +++ b/src/DotRecast.Detour.Extras/DtPolyUtils.cs @@ -16,6 +16,8 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ +using System; + namespace DotRecast.Detour.Extras { public static class DtPolyUtils @@ -62,7 +64,7 @@ namespace DotRecast.Detour.Extras { for (int i = 0; i < 3; i++) { - if (verts[3 * v + i] != verts2[3 * v2 + 1]) + if (Math.Abs(verts[3 * v + i] - verts2[3 * v2 + 1]) > float.Epsilon) { return false; }