Oakrey.Coordinates 3.0.0

dotnet add package Oakrey.Coordinates --version 3.0.0
                    
NuGet\Install-Package Oakrey.Coordinates -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Oakrey.Coordinates" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oakrey.Coordinates" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Oakrey.Coordinates" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Oakrey.Coordinates --version 3.0.0
                    
#r "nuget: Oakrey.Coordinates, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Oakrey.Coordinates@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Oakrey.Coordinates&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Oakrey.Coordinates&version=3.0.0
                    
Install as a Cake Tool

Oakrey.Coordinates

Oakrey.Coordinates provides planar, spatial, scaled, and multi-axis coordinate helpers for geometry, robotics, device axes, and data visualization scenarios.

Features

  • 2D planar coordinates: Cartesian and polar.
  • 3D spatial coordinates: Cartesian, cylindrical, and spherical.
  • Conversions between supported coordinate systems.
  • Distance and distance-from-origin helpers.
  • Multi-axis coordinates with INotifyPropertyChanged propagation.
  • Scaled coordinate helpers for converting values between differently sized coordinate systems.
  • Timestamped axis snapshots for simple measurement records.
  • Finite-number validation for coordinate values and safer division guards.
  • Invariant text formatting for predictable logs and diagnostics.

Installation

.NET CLI

dotnet add package Oakrey.Coordinates

Package Manager Console

Install-Package Oakrey.Coordinates

Usage

using Oakrey.Coordinates.Planar;

CartesianCoordinates cartesian = new(3.0, 4.0);
PolarCoordinates polar = cartesian;

double distance = cartesian.DistanceFromOrigin();
string degrees = polar.ToStringDegrees();
using Oakrey.Coordinates.Spatial;

CartesianCoordinates point = new(-1.0, 1.0, 2.0);
CylindricCoordinates cylindrical = point;
SphericalCoordinates spherical = point;
using Oakrey.Coordinates.Special;

Axis<int> x = new("X", 0, 100, 1, "mm");
Axis<int> y = new("Y", 0, 100, 1, "mm");
MultiAxisCoordinates<int> axes = new(x, y);

axes.SetAxisValue("X", 25);
TimestampedMultiaxisRecord<int> snapshot = new(axes);

Coordinate Conventions

Spatial spherical coordinates use:

  • R: distance from origin.
  • Theta: azimuth angle in the XY plane, calculated with Atan2(y, x).
  • Phi: polar angle from the positive Z axis.

Cylindrical coordinates use:

  • R: radial distance in the XY plane.
  • Theta: azimuth angle in the XY plane.
  • Z: height.

Requirements

  • .NET 10

Project Information

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.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.

Version Downloads Last Updated
3.0.0 120 7/13/2026
2.0.0 351 11/13/2025
1.0.1 202 9/26/2025
1.0.0 329 4/16/2025