From 4e604ec261786058a3e7233b2fb967fcfd6d5373 Mon Sep 17 00:00:00 2001
From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
Date: Tue, 2 Jul 2024 10:43:39 +0200
Subject: [PATCH] Recast: fix typo's in comments
---
src/naveditor/InputGeom.cpp | 2 +-
.../Detour/Source/DetourNavMeshQuery.cpp | 12 ++++++------
.../Source/DetourTileCacheBuilder.cpp | 18 +++++++++---------
.../recast/Recast/Source/RecastMesh.cpp | 18 +++++++++---------
4 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/naveditor/InputGeom.cpp b/src/naveditor/InputGeom.cpp
index 62e210e7..2f55cf8c 100644
--- a/src/naveditor/InputGeom.cpp
+++ b/src/naveditor/InputGeom.cpp
@@ -48,7 +48,7 @@ static bool intersectSegmentTriangle(const float* sp, const float* sq,
if (d <= 0.0f) return false;
// Compute intersection t value of pq with plane of triangle. A ray
- // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay
+ // intersects if 0 <= t. Segment intersects if 0 <= t <= 1. Delay
// dividing by d until intersection has been found to pierce triangle
rcVsub(ap, sp, a);
t = rcVdot(ap, norm);
diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp
index ff5c63fa..f3f5b4fa 100644
--- a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp
+++ b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp
@@ -2367,7 +2367,7 @@ dtStatus dtNavMeshQuery::getEdgeMidPoint(dtPolyRef from, const dtPoly* fromPoly,
/// This method is meant to be used for quick, short distance checks.
///
/// If the path array is too small to hold the result, it will be filled as
-/// far as possible from the start postion toward the end position.
+/// far as possible from the start position toward the end position.
///
/// Using the Hit Parameter (t)
///
@@ -2425,7 +2425,7 @@ dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, cons
/// This method is meant to be used for quick, short distance checks.
///
/// If the path array is too small to hold the result, it will be filled as
-/// far as possible from the start postion toward the end position.
+/// far as possible from the start position toward the end position.
///
/// Using the Hit Parameter t of RaycastHit
///
@@ -2605,7 +2605,7 @@ dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, cons
float lmax = left[1] + (right[1] - left[1])*(link->bmax*s);
if (lmin > lmax) dtSwap(lmin, lmax);
- // Find y intersection.
+ // Find Y intersection.
float y = startPos[1] + (endPos[1]-startPos[1])*tmax;
if (y >= lmin && y <= lmax)
{
@@ -3071,7 +3071,7 @@ dtStatus dtNavMeshQuery::getPathFromDijkstraSearch(dtPolyRef endRef, dtPolyRef*
/// the start polygon.
///
/// The same intersection test restrictions that apply to the findPolysAroundCircle
-/// mehtod applies to this method.
+/// method applies to this method.
///
/// The value of the center point is used as the start point for cost calculations.
/// It is not projected onto the surface of the mesh, so its y-value will effect
@@ -3460,7 +3460,7 @@ dtStatus dtNavMeshQuery::getPolyWallSegments(dtPolyRef ref, const dtQueryFilter*
/// radius. In this case the values of @p hitPos and @p hitNormal are
/// undefined.
///
-/// The normal will become unpredicable if @p hitDist is a very small number.
+/// The normal will become unpredictable if @p hitDist is a very small number.
///
dtStatus dtNavMeshQuery::findDistanceToWall(dtPolyRef startRef, const float* centerPos, const float maxRadius,
const dtQueryFilter* filter,
@@ -3502,7 +3502,7 @@ dtStatus dtNavMeshQuery::findDistanceToWall(dtPolyRef startRef, const float* cen
bestNode->flags |= DT_NODE_CLOSED;
// Get poly and tile.
- // The API input has been cheked already, skip checking internal data.
+ // The API input has been checked already, skip checking internal data.
const dtPolyRef bestRef = bestNode->id;
const dtMeshTile* bestTile = 0;
const dtPoly* bestPoly = 0;
diff --git a/src/thirdparty/recast/DetourTileCache/Source/DetourTileCacheBuilder.cpp b/src/thirdparty/recast/DetourTileCache/Source/DetourTileCacheBuilder.cpp
index 2bdc1714..e9390d0b 100644
--- a/src/thirdparty/recast/DetourTileCache/Source/DetourTileCacheBuilder.cpp
+++ b/src/thirdparty/recast/DetourTileCache/Source/DetourTileCacheBuilder.cpp
@@ -1074,7 +1074,7 @@ inline int area2(const unsigned char* a, const unsigned char* b, const unsigned
return ((int)b[0] - (int)a[0]) * ((int)c[1] - (int)a[1]) - ((int)c[0] - (int)a[0]) * ((int)b[1] - (int)a[1]);
}
-// Exclusive or: true iff exactly one argument is true.
+// Exclusive or: true if exactly one argument is true.
// The arguments are negated to ensure that they are 0/1
// values. Then the bitwise Xor operator may apply.
// (This idea is due to Michael Baldwin.)
@@ -1083,7 +1083,7 @@ inline bool xorb(bool x, bool y)
return !x ^ !y;
}
-// Returns true iff c is strictly to the left of the directed
+// Returns true if c is strictly to the left of the directed
// line through a to b.
inline bool left(const unsigned char* a, const unsigned char* b, const unsigned char* c)
{
@@ -1100,7 +1100,7 @@ inline bool collinear(const unsigned char* a, const unsigned char* b, const unsi
return area2(a, b, c) == 0;
}
-// Returns true iff ab properly intersects cd: they share
+// Returns true if ab properly intersects cd: they share
// a point interior to both segments. The properness of the
// intersection is ensured by using strict leftness.
static bool intersectProp(const unsigned char* a, const unsigned char* b,
@@ -1114,8 +1114,8 @@ static bool intersectProp(const unsigned char* a, const unsigned char* b,
return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b));
}
-// Returns T iff (a,b,c) are collinear and point c lies
-// on the closed segement ab.
+// Returns T if (a,b,c) are collinear and point c lies
+// on the closed segment ab.
static bool between(const unsigned char* a, const unsigned char* b, const unsigned char* c)
{
if (!collinear(a, b, c))
@@ -1127,7 +1127,7 @@ static bool between(const unsigned char* a, const unsigned char* b, const unsign
return ((a[1] <= c[1]) && (c[1] <= b[1])) || ((a[1] >= c[1]) && (c[1] >= b[1]));
}
-// Returns true iff segments ab and cd intersect, properly or improperly.
+// Returns true if segments ab and cd intersect, properly or improperly.
static bool intersect(const unsigned char* a, const unsigned char* b,
const unsigned char* c, const unsigned char* d)
{
@@ -1145,7 +1145,7 @@ static bool vequal(const unsigned char* a, const unsigned char* b)
return a[0] == b[0] && a[1] == b[1];
}
-// Returns T iff (v_i, v_j) is a proper internal *or* external
+// Returns T if (v_i, v_j) is a proper internal *or* external
// diagonal of P, *ignoring edges incident to v_i and v_j*.
static bool diagonalie(int i, int j, int n, const unsigned char* verts, const unsigned short* indices)
{
@@ -1172,7 +1172,7 @@ static bool diagonalie(int i, int j, int n, const unsigned char* verts, const un
return true;
}
-// Returns true iff the diagonal (i,j) is strictly internal to the
+// Returns true if the diagonal (i,j) is strictly internal to the
// polygon P in the neighborhood of the i endpoint.
static bool inCone(int i, int j, int n, const unsigned char* verts, const unsigned short* indices)
{
@@ -1189,7 +1189,7 @@ static bool inCone(int i, int j, int n, const unsigned char* verts, const unsign
return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1));
}
-// Returns T iff (v_i, v_j) is a proper internal
+// Returns T if (v_i, v_j) is a proper internal
// diagonal of P.
static bool diagonal(int i, int j, int n, const unsigned char* verts, const unsigned short* indices)
{
diff --git a/src/thirdparty/recast/Recast/Source/RecastMesh.cpp b/src/thirdparty/recast/Recast/Source/RecastMesh.cpp
index 178df6e6..1267336d 100644
--- a/src/thirdparty/recast/Recast/Source/RecastMesh.cpp
+++ b/src/thirdparty/recast/Recast/Source/RecastMesh.cpp
@@ -169,7 +169,7 @@ inline int area2(const int* a, const int* b, const int* c)
return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);
}
-// Exclusive or: true iff exactly one argument is true.
+// Exclusive or: true if exactly one argument is true.
// The arguments are negated to ensure that they are 0/1
// values. Then the bitwise Xor operator may apply.
// (This idea is due to Michael Baldwin.)
@@ -178,7 +178,7 @@ inline bool xorb(bool x, bool y)
return !x ^ !y;
}
-// Returns true iff c is strictly to the left of the directed
+// Returns true if c is strictly to the left of the directed
// line through a to b.
inline bool left(const int* a, const int* b, const int* c)
{
@@ -205,7 +205,7 @@ inline bool collinear(const int* a, const int* b, const int* c)
return area2(a, b, c) == 0;
}
-// Returns true iff ab properly intersects cd: they share
+// Returns true if ab properly intersects cd: they share
// a point interior to both segments. The properness of the
// intersection is ensured by using strict leftness.
static bool intersectProp(const int* a, const int* b, const int* c, const int* d)
@@ -221,8 +221,8 @@ static bool intersectProp(const int* a, const int* b, const int* c, const int* d
#endif
}
-// Returns T iff (a,b,c) are collinear and point c lies
-// on the closed segement ab.
+// Returns T if (a,b,c) are collinear and point c lies
+// on the closed segment ab.
static bool between(const int* a, const int* b, const int* c)
{
if (!collinear(a, b, c))
@@ -234,7 +234,7 @@ static bool between(const int* a, const int* b, const int* c)
return ((a[1] <= c[1]) && (c[1] <= b[1])) || ((a[1] >= c[1]) && (c[1] >= b[1]));
}
-// Returns true iff segments ab and cd intersect, properly or improperly.
+// Returns true if segments ab and cd intersect, properly or improperly.
static bool intersect(const int* a, const int* b, const int* c, const int* d)
{
if (intersectProp(a, b, c, d))
@@ -257,7 +257,7 @@ static bool vequal(const int* a, const int* b)
#define STEP_DIR next
#define REV_STEP_DIR prev
#endif
-// Returns T iff (v_i, v_j) is a proper internal *or* external
+// Returns T if (v_i, v_j) is a proper internal *or* external
// diagonal of P, *ignoring edges incident to v_i and v_j*.
static bool diagonalie(int i, int j, int n, const int* verts, int* indices)
{
@@ -284,7 +284,7 @@ static bool diagonalie(int i, int j, int n, const int* verts, int* indices)
return true;
}
-// Returns true iff the diagonal (i,j) is strictly internal to the
+// Returns true if the diagonal (i,j) is strictly internal to the
// polygon P in the neighborhood of the i endpoint.
static bool inCone(int i, int j, int n, const int* verts, int* indices)
{
@@ -309,7 +309,7 @@ static bool inCone(int i, int j, int n, const int* verts, int* indices)
#endif
}
-// Returns T iff (v_i, v_j) is a proper internal
+// Returns T if (v_i, v_j) is a proper internal
// diagonal of P.
static bool diagonal(int i, int j, int n, const int* verts, int* indices)
{