GraphHelpers 1.0.0
dotnet add package GraphHelpers --version 1.0.0
NuGet\Install-Package GraphHelpers -Version 1.0.0
<PackageReference Include="GraphHelpers" Version="1.0.0" />
paket add GraphHelpers --version 1.0.0
#r "nuget: GraphHelpers, 1.0.0"
// Install GraphHelpers as a Cake Addin #addin nuget:?package=GraphHelpers&version=1.0.0 // Install GraphHelpers as a Cake Tool #tool nuget:?package=GraphHelpers&version=1.0.0
Graph Helpers
This C# project contains helper classes for working with graphs and geometry.
Features
Angle
- Represents an angle value with helper methods for converting between radians and degreesAngleHelper
- Contains methods for calculating angles between vectorsLines
- Calculates angles between successive points along a linePointD
- Represents a point in 2D space using double precision
Usage
Calculating angles along a route
// Create sample points
var points = new[]
{
new PointD(0, 0),
new PointD(1, 0),
new PointD(2, 1)
};
// Calculate angles
var angles = Lines.GetAnglesForLine(points);
// Print results
foreach (var (point, angle) in angles)
{
Console.WriteLine($"At point {point}, angle is {angle.DegreeValue} degrees");
}
Creating and manipulating angles
// Create 90 degree angle
var ninetyDeg = Angle.FromDegrees(90);
// Convert to radians
var ninetyRad = ninetyDeg.RadianValue;
// Add two angles
var sum = thirtyDeg + sixtyDeg;
Classes
Angle
Represents an angle value in radians and degrees. Provides methods to:
- Create angles from radians or degrees
- Convert between units
- Add angles together
AngleHelper
Contains the Cos3Pnt
method to calculate the angle between 3 vectors using the cosine formula.
Lines
Provides the GetAnglesForLine
method to calculate angles between successive points along a route.
PointD
Represents a 2D point using double precision. Overloads operators like +, -, * for manipulating points.
Installation
PM > Install-Package GraphHelpers
License
This project is licensed under the MIT license. See LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net7.0
- MathNet.Numerics (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 190 | 8/4/2023 |