From 939050eb82a033033a0709fdf1c165fcb0ce448f Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Thu, 8 Jul 2010 11:25:57 +0000 Subject: [PATCH] fix for Issue 89:Call to dtVperp2d - don't need to negate --- Detour/Source/DetourCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Detour/Source/DetourCommon.cpp b/Detour/Source/DetourCommon.cpp index 891e1ea..87469b8 100644 --- a/Detour/Source/DetourCommon.cpp +++ b/Detour/Source/DetourCommon.cpp @@ -125,8 +125,8 @@ bool dtIntersectSegmentPoly2D(const float* p0, const float* p1, float edge[3], diff[3]; dtVsub(edge, &verts[i*3], &verts[j*3]); dtVsub(diff, p0, &verts[j*3]); - float n = dtVperp2D(edge, diff); - float d = -dtVperp2D(edge, dir); + const float n = dtVperp2D(edge, diff); + const float d = dtVperp2D(dir, edge); if (fabsf(d) < EPS) { // S is nearly parallel to this edge