From f9ddd3149343c196a636788597f3a28d9a479904 Mon Sep 17 00:00:00 2001 From: Kromster80 Date: Mon, 10 Nov 2014 15:07:17 +0300 Subject: [PATCH] Update RecastMesh.cpp --- Recast/Source/RecastMesh.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Recast/Source/RecastMesh.cpp b/Recast/Source/RecastMesh.cpp index e4f9c4b..38b45fe 100644 --- a/Recast/Source/RecastMesh.cpp +++ b/Recast/Source/RecastMesh.cpp @@ -160,6 +160,7 @@ static unsigned short addVertex(unsigned short x, unsigned short y, unsigned sho return (unsigned short)i; } +// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }