From 24a11a28239e535418203db4d70f8d6fb0381e0a Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Sat, 14 Jun 2014 15:59:32 +0300 Subject: [PATCH] Fixed silly mistake in detail mesh next(), prev() functions --- Recast/Source/RecastMeshDetail.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Recast/Source/RecastMeshDetail.cpp b/Recast/Source/RecastMeshDetail.cpp index f497bca..431952f 100644 --- a/Recast/Source/RecastMeshDetail.cpp +++ b/Recast/Source/RecastMeshDetail.cpp @@ -512,12 +512,12 @@ static float polyMinExtent(const float* verts, const int nverts) inline int next(int i, int n) { - return (n+1) % n; + return (i+1) % n; } inline int prev(int i, int n) { - return (n+1) % n; + return (i + n-1) % n; } static void triangulateHull(const int nverts, const float* verts, const int nhull, const int* hull, rcIntArray& tris)