Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CPP/Clipper2Lib/include/clipper2/clipper.core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; };

Expand Down
2 changes: 1 addition & 1 deletion CPP/Clipper2Lib/src/clipper.offset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions CPP/Clipper2Lib/src/clipper.triangulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions CPP/Examples/UsingZ/UsingZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion CSharp/Clipper2Lib/Clipper.Offset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion Delphi/Clipper2Lib/Clipper.Offset.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions Delphi/Clipper2Lib/Clipper.Triangulation.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down