From ea3d62c8474fc28cd27eb4fa436058ad725a9520 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sat, 12 Sep 2026 14:33:52 +0000 Subject: [PATCH] Fix various typos Found via `codespell -q 3 -L alledges,collet,currenty,iif,longe,openend,pathc,ptd` --- CPP/Clipper2Lib/include/clipper2/clipper.core.h | 2 +- CPP/Clipper2Lib/src/clipper.offset.cpp | 2 +- CPP/Clipper2Lib/src/clipper.triangulation.cpp | 8 ++++---- CPP/Examples/UsingZ/UsingZ.cpp | 6 +++--- CSharp/Clipper2Lib/Clipper.Offset.cs | 2 +- Delphi/Clipper2Lib/Clipper.Offset.pas | 2 +- Delphi/Clipper2Lib/Clipper.Triangulation.pas | 8 ++++---- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CPP/Clipper2Lib/include/clipper2/clipper.core.h b/CPP/Clipper2Lib/include/clipper2/clipper.core.h index 99a52054d..3343141ee 100644 --- a/CPP/Clipper2Lib/include/clipper2/clipper.core.h +++ b/CPP/Clipper2Lib/include/clipper2/clipper.core.h @@ -713,7 +713,7 @@ namespace Clipper2Lib inline UInt128Struct MultiplyUInt64(uint64_t a, uint64_t b) // #834, #835 { - // note to self - lamba expressions follow + // note to self - lambda expressions follow const auto lo = [](uint64_t x) { return x & 0xFFFFFFFF; }; const auto hi = [](uint64_t x) { return x >> 32; }; diff --git a/CPP/Clipper2Lib/src/clipper.offset.cpp b/CPP/Clipper2Lib/src/clipper.offset.cpp index d9f31cf9e..eb6affc1b 100644 --- a/CPP/Clipper2Lib/src/clipper.offset.cpp +++ b/CPP/Clipper2Lib/src/clipper.offset.cpp @@ -17,7 +17,7 @@ const double floating_point_tolerance = 1e-12; // Clipper2 approximates arcs by using series of relatively short straight //line segments. And logically, shorter line segments will produce better arc // approximations. But very short segments can degrade performance, usually -// with little or no discernable improvement in curve quality. Very short +// with little or no discernible improvement in curve quality. Very short // segments can even detract from curve quality, due to the effects of integer // rounding. Since there isn't an optimal number of line segments for any given // arc radius (that perfectly balances curve approximation with performance), diff --git a/CPP/Clipper2Lib/src/clipper.triangulation.cpp b/CPP/Clipper2Lib/src/clipper.triangulation.cpp index 51a27096c..e27fd0f08 100644 --- a/CPP/Clipper2Lib/src/clipper.triangulation.cpp +++ b/CPP/Clipper2Lib/src/clipper.triangulation.cpp @@ -412,11 +412,11 @@ namespace Clipper2Lib } } - // InCircleTest reqires edge.triangleA to be a valid triangle + // InCircleTest requires edge.triangleA to be a valid triangle // if IsEmptyTriangle(edge.triangleA) then Exit; // slower if (CrossProductSign(vertA->pt, edge->vL->pt, edge->vR->pt) == 0) return; - // ictResult - result sign is dependant on triangleA's orientation + // ictResult - result sign is dependent on triangleA's orientation double ictResult = InCircleTest(vertA->pt, edge->vL->pt, edge->vR->pt, vertB->pt); if (ictResult == 0 || // if on or out of circle then exit (RightTurning(vertA->pt, edge->vL->pt, edge->vR->pt) == (ictResult < 0))) return; @@ -602,7 +602,7 @@ namespace Clipper2Lib else longE->vR = newT; // add shortened longEdge to newT.edges newT->edges.push_back(longE); - // and create a new edge betweem newV, oldT + // and create a new edge between newV, oldT CreateEdge(newT, oldT, longE->kind); } @@ -868,7 +868,7 @@ namespace Clipper2Lib void Delaunay::AddEdgeToActives(Edge* edge) { - // nb: on occassions this method can get called twice for a given edge + // nb: on occasions this method can get called twice for a given edge // This is because, in the Triangulate() method where vertex 'edges' // arrays are being parsed, edges can can be removed from the array // which changes the index of following edges. diff --git a/CPP/Examples/UsingZ/UsingZ.cpp b/CPP/Examples/UsingZ/UsingZ.cpp index 4b06bfbbb..23715cd6c 100644 --- a/CPP/Examples/UsingZ/UsingZ.cpp +++ b/CPP/Examples/UsingZ/UsingZ.cpp @@ -61,9 +61,9 @@ static uint32_t ByteToRainbowColor(uint8_t b) //129..171 case 3: b2 = (171 - b) * 6; return 0xFF0000FF | (b2 << 8); // 0xFF00FFFF -> 0xFF0000FF (aqua..blue) //172..214 - case 4: b2 = (b - 172) * 6; return 0xFF0000FF | (b2 << 16); // 0xFF0000FF -> 0xFFFF00FF (blue..fuschia) + case 4: b2 = (b - 172) * 6; return 0xFF0000FF | (b2 << 16); // 0xFF0000FF -> 0xFFFF00FF (blue..fuchsia) //215..255 - default: b2 = (255 - b) * 6; return 0xFFFF0000 | b2; // 0xFF0000FF -> 0xFFFF00FF (fuschia..red) + default: b2 = (255 - b) * 6; return 0xFFFF0000 | b2; // 0xFF0000FF -> 0xFFFF00FF (fuchsia..red) } } @@ -176,7 +176,7 @@ void Test2_Double() PointD mp = r.MidPoint(); double d = (mp.y - r.top) / 255; // for each point in subject, set its 'z' as a - // relative distance fron 'mp' (scaled to 255) + // relative distance from 'mp' (scaled to 255) for (PathD& path : subject) for (PointD& pt : path) pt.z = Distance(pt, mp) / d; diff --git a/CSharp/Clipper2Lib/Clipper.Offset.cs b/CSharp/Clipper2Lib/Clipper.Offset.cs index cb277169f..267cd63be 100644 --- a/CSharp/Clipper2Lib/Clipper.Offset.cs +++ b/CSharp/Clipper2Lib/Clipper.Offset.cs @@ -77,7 +77,7 @@ public Group(Paths64 paths, JoinType joinType, EndType endType = EndType.Polygon // Clipper2 approximates arcs by using series of relatively short straight //line segments. And logically, shorter line segments will produce better arc // approximations. But very short segments can degrade performance, usually - // with little or no discernable improvement in curve quality. Very short + // with little or no discernible improvement in curve quality. Very short // segments can even detract from curve quality, due to the effects of integer // rounding. Since there isn't an optimal number of line segments for any given // arc radius (that perfectly balances curve approximation with performance), diff --git a/Delphi/Clipper2Lib/Clipper.Offset.pas b/Delphi/Clipper2Lib/Clipper.Offset.pas index 064b0f24d..9aae9142e 100644 --- a/Delphi/Clipper2Lib/Clipper.Offset.pas +++ b/Delphi/Clipper2Lib/Clipper.Offset.pas @@ -145,7 +145,7 @@ implementation // Clipper2 approximates arcs by using series of relatively short straight //line segments. And logically, shorter line segments will produce better arc // approximations. But very short segments can degrade performance, usually -// with little or no discernable improvement in curve quality. Very short +// with little or no discernible improvement in curve quality. Very short // segments can even detract from curve quality, due to the effects of integer // rounding. Since there isn't an optimal number of line segments for any given // arc radius (that perfectly balances curve approximation with performance), diff --git a/Delphi/Clipper2Lib/Clipper.Triangulation.pas b/Delphi/Clipper2Lib/Clipper.Triangulation.pas index 652a1b32c..1bfd19f28 100644 --- a/Delphi/Clipper2Lib/Clipper.Triangulation.pas +++ b/Delphi/Clipper2Lib/Clipper.Triangulation.pas @@ -647,11 +647,11 @@ procedure TDelaunay.ForceLegal(edge: PEdge); end; end; - // InCircleTest reqires edge.triangleA to be a valid triangle + // InCircleTest requires edge.triangleA to be a valid triangle // if IsEmptyTriangle(edge.triangleA) then Exit; // slower if CrossProductIsZero(vertA.pt, edge.vL.pt, edge.vR.pt) then Exit; - // ictResult - result sign is dependant on triangleA's orientation + // ictResult - result sign is dependent on triangleA's orientation ictResult := InCircleTest(vertA.pt, edge.vL.pt, edge.vR.pt, vertB.pt); if (ictResult = 0) or // if on or out of circle then exit (RightTurning(vertA, edge.vL, edge.vR) = (ictResult < 0)) then @@ -738,7 +738,7 @@ function TDelaunay.CreateTriangle(e1, e2, e3: PEdge): PTriangle; procedure TDelaunay.AddEdgeToActives(edge: PEdge); begin - // nb: on occassions this method can get called twice for a given edge + // nb: occasionally this method can get called twice for a given edge // This is because, in the Triangulate() method where vertex 'edges' // arrays are being parsed, edges can can be removed from the array // which changes the index of following edges. @@ -866,7 +866,7 @@ procedure TDelaunay.MergeDupOrCollinearVertices; len := Length(newT.edges); SetLength(newT.edges, len + 1); newT.edges[len] := longEdge; - // and create a new edge betweem newV, oldT + // and create a new edge between newV, oldT CreateEdge(newT, oldT, longEdge.kind); end;