Fixed silly mistake in detail mesh next(), prev() functions

This commit is contained in:
Mikko Mononen 2014-06-14 15:59:32 +03:00
parent e6fc6a3817
commit 24a11a2823

View File

@ -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)