Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Jan 26, 2025
1 parent ef6dbfd commit a8ca3f7
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CPP/BenchMark/PointInPolygonBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ inline PointInPolygonResult PIP2(const Point64& pt, const Path64& polygon)
}

/////////////////////////////////////////////////////////
// PIP3: An entirely different algorithm for comparision.
// PIP3: An entirely different algorithm for comparison.
// "Optimal Reliable Point-in-Polygon Test and
// Differential Coding Boolean Operations on Polygons"
// by Jianqiang Hao et al.
Expand Down
2 changes: 1 addition & 1 deletion CPP/Clipper2Lib/include/clipper2/clipper.export.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _______________________________________________________________
CPaths64 and CPathsD:
These are also arrays of either int64_t or double values that
contain any number of consecutive CPath structures. However,
preceeding the first path is a pair of values. The first value
preceding the first path is a pair of values. The first value
contains the length of the entire array structure (A), and the
second contains the number (ie count) of contained paths (C).
Memory allocation for CPaths64 = A * sizeof(int64_t)
Expand Down
6 changes: 3 additions & 3 deletions CPP/Clipper2Lib/src/clipper.engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ namespace Clipper2Lib {
while (op2 != op && op2->pt.y > pt.y) op2 = op2->next;
if (op2 == op) break;

// must have touched or crossed the pt.Y horizonal
// must have touched or crossed the pt.Y horizontal
// and this must happen an even number of times

if (op2->pt.y == pt.y) // touching the horizontal
Expand Down Expand Up @@ -1961,7 +1961,7 @@ namespace Clipper2Lib {
else if (IsFront(e1) || (e1.outrec == e2.outrec))
{
//this 'else if' condition isn't strictly needed but
//it's sensible to split polygons that ony touch at
//it's sensible to split polygons that only touch at
//a common vertex (not at common edges).

#ifdef USINGZ
Expand Down Expand Up @@ -2661,7 +2661,7 @@ namespace Clipper2Lib {

if (horz.outrec)
{
//nb: The outrec containining the op returned by IntersectEdges
//nb: The outrec containing the op returned by IntersectEdges
//above may no longer be associated with horzEdge.
AddTrialHorzJoin(GetLastOp(horz));
}
Expand Down
2 changes: 1 addition & 1 deletion CPP/Utils/ClipFileSave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool SaveTest(const std::string& filename, bool append,
bool found = false;
int last_cap_pos = 0, curr_cap_pos = 0;
int64_t last_test_no = 0;
if (append && FileExists(filename)) //get the number of the preceeding test
if (append && FileExists(filename)) //get the number of the preceding test
{
ifstream file;
file.open(filename, std::ios::binary);
Expand Down
4 changes: 2 additions & 2 deletions CSharp/Clipper2Lib/Clipper.Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ private void IntersectEdges(Active ae1, Active ae2, Point64 pt)
else if (IsFront(ae1) || (ae1.outrec == ae2.outrec))
{
// this 'else if' condition isn't strictly needed but
// it's sensible to split polygons that ony touch at
// it's sensible to split polygons that only touch at
// a common vertex (not at common edges).
resultOp = AddLocalMaxPoly(ae1, ae2, pt);
#if USINGZ
Expand Down Expand Up @@ -2628,7 +2628,7 @@ private static PointInPolygonResult PointInOpPolygon(Point64 pt, OutPt op)
while (op2 != op && op2.pt.Y > pt.Y) op2 = op2.next!;
if (op2 == op) break;

// must have touched or crossed the pt.Y horizonal
// must have touched or crossed the pt.Y horizontal
// and this must happen an even number of times

if (op2.pt.Y == pt.Y) // touching the horizontal
Expand Down
6 changes: 3 additions & 3 deletions Delphi/Clipper2Lib/Clipper.Engine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ function PointInOpPolygon(const pt: TPoint64; op: POutPt): TPointInPolygonResult
while (op2 <> op) and (op2.pt.Y > pt.Y) do op2 := op2.next;
if (op2 = op) then break;

// must have touched or crossed the pt.Y horizonal
// must have touched or crossed the pt.Y horizontal
// and this must happen an even number of times

if (op2.pt.Y = pt.Y) then // touching the horizontal
Expand Down Expand Up @@ -2690,7 +2690,7 @@ procedure TClipperBase.IntersectEdges(e1, e2: PActive; pt: TPoint64);
end else if IsFront(e1) or (e1.outrec = e2.outrec) then
begin
// this 'else if' condition isn't strictly needed but
// it's sensible to split polygons that ony touch at
// it's sensible to split polygons that only touch at
// a common vertex (not at common edges).
op := AddLocalMaxPoly(e1, e2, pt);
{$IFDEF USINGZ}
Expand Down Expand Up @@ -3528,7 +3528,7 @@ procedure TClipperBase.DoHorizontal(horzEdge: PActive);
end;
if IsHotEdge(horzEdge) then
begin
//nb: The outrec containining the op returned by IntersectEdges
//nb: The outrec containing the op returned by IntersectEdges
//above may no longer be associated with horzEdge.
FHorzSegList.Add(GetLastOp(horzEdge));
end;
Expand Down
2 changes: 1 addition & 1 deletion Delphi/Clipper2Lib/Clipper.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{.$DEFINE USINGZ}

///////////////////////////////////////////////////////////////////////////////
//COMPILER DIFINED PREPROCESSOR DIRECTIVES (ie. do not touch ;))
//COMPILER DEFINED PREPROCESSOR DIRECTIVES (ie. do not touch ;))
///////////////////////////////////////////////////////////////////////////////

{$IFDEF FPC}
Expand Down
2 changes: 1 addition & 1 deletion Delphi/Clipper2Lib/Clipper.pas
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ function DistanceSqrd(const pt1, pt2: TPoint64): double;
var
x1,y1,x2,y2: double;
begin
// nb: older versions of Delphi don't allow explicit typcasting
// nb: older versions of Delphi don't allow explicit typecasting
x1 := pt1.X; y1 := pt1.Y;
x2 := pt2.X; y2 := pt2.Y;
result := Sqr(x1 - x2) + Sqr(y1 - y2);
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
### A Polygon <a href="https://en.wikipedia.org/wiki/Clipping_(computer_graphics)">Clipping</a> and <a href="https://en.wikipedia.org/wiki/Parallel_curve">Offsetting</a> library (in C++, C# &amp; Delphi)<br>
[![GitHub Actions C++ status](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_cpp.yml/badge.svg)](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_cpp.yml)&nbsp;[![C#](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_csharp.yml/badge.svg)](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_csharp.yml)&nbsp;[![License](https://img.shields.io/badge/License-Boost_1.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)
[![Nuget](https://img.shields.io/nuget/v/Clipper2?color=green)](https://www.nuget.org/packages/Clipper2)
[![documentation](https://user-images.githubusercontent.com/5280692/187832279-b2a43890-da80-4888-95fe-793f092be372.svg)](http://www.angusj.com/clipper2/Docs/Overview.htm)
[![documentation](https://user-images.githubusercontent.com/5280692/187832279-b2a43890-da80-4888-95fe-793f092be372.svg)](https://www.angusj.com/clipper2/Docs/Overview.htm)

The <b>Clipper2</b> library performs **intersection**, **union**, **difference** and **XOR** boolean operations on both simple and complex polygons. It also performs polygon offsetting. This is a major update of my original <a href="https://sourceforge.net/projects/polyclipping/"><b>Clipper</b></a> library that was written over 10 years ago. That library I'm now calling <b>Clipper1</b>, and while it still works very well, Clipper2 is [better](http://www.angusj.com/clipper2/Docs/Changes.htm) in just about every way.
The <b>Clipper2</b> library performs **intersection**, **union**, **difference** and **XOR** boolean operations on both simple and complex polygons. It also performs polygon offsetting. This is a major update of my original <a href="https://sourceforge.net/projects/polyclipping/"><b>Clipper</b></a> library that was written over 10 years ago. That library I'm now calling <b>Clipper1</b>, and while it still works very well, Clipper2 is [better](https://www.angusj.com/clipper2/Docs/Changes.htm) in just about every way.

### Compilers
<b>Clipper2</b> can be compiled using either C++, or C#, or Delphi Pascal. The library can also be accessed from other programming languages by dynamically linking to exported functions in the [C++ compiled Clipper2 library](https://github.com/AngusJohnson/Clipper2/tree/main/DLL). (Since the C++ compiled code is [measurably](https://www.angusj.com/clipper2/Docs/Changes.htm) faster, C# and Delphi developers may also prefer this approach in applications where the library's performance is critical.)
Expand All @@ -16,7 +16,7 @@ The <b>Clipper2</b> library performs **intersection**, **union**, **difference**

### Documentation

<a href="http://www.angusj.com/clipper2/Docs/Overview.htm"><b>Extensive HTML documentation</b></a>
<a href="https://www.angusj.com/clipper2/Docs/Overview.htm"><b>Extensive HTML documentation</b></a>
<br><br>

### Examples
Expand Down

0 comments on commit a8ca3f7

Please sign in to comment.