Gon 0.0.1
dotnet add package Gon --version 0.0.1
NuGet\Install-Package Gon -Version 0.0.1
<PackageReference Include="Gon" Version="0.0.1" />
<PackageVersion Include="Gon" Version="0.0.1" />
<PackageReference Include="Gon" />
paket add Gon --version 0.0.1
#r "nuget: Gon, 0.0.1"
#:package Gon@0.0.1
#addin nuget:?package=Gon&version=0.0.1
#tool nuget:?package=Gon&version=0.0.1
Gon.cs
Installation
Install the latest
.NET SDK.
User
Download and install the latest stable version from NuGet repository
dotnet add package Gon
Developer
Download the latest version from GitHub repository
git clone https://github.com/lycantropos/Gon.cs
Install
dotnet add reference Gon.cs/src/Gon/Gon.csproj
Usage
using System.Diagnostics;
using Point = Gon.Point<double>;
using Contour = Gon.Contour<double>;
using Polygon = Gon.Polygon<double>;
using Location = Gon.Location;
namespace GonExamples
{
public static class Basic
{
public static void RunExamples()
{
// construction
var squareBorder = new Contour(
new[] { new Point(0, 0), new Point(4, 0), new Point(4, 4), new Point(0, 4) }
);
var square = new Polygon(squareBorder);
// accessing various properties
Debug.Assert(square.Border == squareBorder);
Debug.Assert(square.Border.Vertices.Length == 4);
Debug.Assert(square.Holes.Length == 0);
// equality checks
Debug.Assert(square == new Polygon(squareBorder));
// point-in-polygon checks
Debug.Assert(square.Contains(new Point(2, 2)));
Debug.Assert(square.Contains(new Point(4, 4)));
Debug.Assert(!square.Contains(new Point(6, 6)));
// point location queries
Debug.Assert(square.Locate(new Point(2, 2)) == Location.Interior);
Debug.Assert(square.Locate(new Point(4, 4)) == Location.Boundary);
Debug.Assert(square.Locate(new Point(6, 6)) == Location.Exterior);
// set intersection
Polygon[] intersection = square & square;
Debug.Assert(intersection.Length == 1);
Debug.Assert(intersection[0] == square);
// set union
Polygon[] union = square | square;
Debug.Assert(union.Length == 1);
Debug.Assert(union[0] == square);
// set difference
Polygon[] difference = square - square;
Debug.Assert(difference.Length == 0);
// set symmetric difference
Polygon[] symmetricDifference = square ^ square;
Debug.Assert(symmetricDifference.Length == 0);
}
}
}
More examples can be found at src/GonExamples directory.
Development
Bumping version
Preparation
Install bump2version.
Pre-release
Choose which version number category to bump following semver specification.
Test bumping version
bump2version --dry-run --verbose $CATEGORY
where $CATEGORY is the target version number category name, possible
values are patch/minor/major.
Bump version
bump2version --verbose $CATEGORY
This will set version to major.minor.patch-alpha.
Release
Test bumping version
bump2version --dry-run --verbose release
Bump version
bump2version --verbose release
This will set version to major.minor.patch.
Running tests
In what follows python is an alias for python3.8
or any later version (python3.9 and so on).
Install dependencies
python -m pip install -r requirements-tests.txt
Run tests
pytest
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 is compatible. netstandard1.4 is compatible. netstandard1.5 is compatible. netstandard1.6 is compatible. netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Universal Windows Platform | uap was computed. uap10.0 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.6
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.7
- OptimizedPriorityQueue (>= 5.1.0)
-
.NETFramework 4.8
- OptimizedPriorityQueue (>= 5.1.0)
-
.NETStandard 1.3
- Microsoft.CSharp (>= 4.7.0)
- NETStandard.Library (>= 1.6.1)
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 1.4
- Microsoft.CSharp (>= 4.7.0)
- NETStandard.Library (>= 1.6.1)
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 1.5
- Microsoft.CSharp (>= 4.7.0)
- NETStandard.Library (>= 1.6.1)
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 1.6
- Microsoft.CSharp (>= 4.7.0)
- NETStandard.Library (>= 1.6.1)
- OptimizedPriorityQueue (>= 5.1.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- OptimizedPriorityQueue (>= 5.1.0)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- OptimizedPriorityQueue (>= 5.1.0)
-
net5.0
- OptimizedPriorityQueue (>= 5.1.0)
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.