Thunder.UnitsNET.Vectors 0.2.0

dotnet add package Thunder.UnitsNET.Vectors --version 0.2.0
                    
NuGet\Install-Package Thunder.UnitsNET.Vectors -Version 0.2.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="Thunder.UnitsNET.Vectors" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Thunder.UnitsNET.Vectors" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Thunder.UnitsNET.Vectors" />
                    
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 Thunder.UnitsNET.Vectors --version 0.2.0
                    
#r "nuget: Thunder.UnitsNET.Vectors, 0.2.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 Thunder.UnitsNET.Vectors@0.2.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=Thunder.UnitsNET.Vectors&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Thunder.UnitsNET.Vectors&version=0.2.0
                    
Install as a Cake Tool

Thunder.UnitsNET.Vectors

A unit-aware 2D/3D vector library for physics-driven game loops. Component types come from UnitsNet, so every operation preserves physical units — LengthVector2 / Duration returns SpeedVector2, not a raw float.

Quick start

using Thunder.UnitsNET.Vectors;
using UnitsNet;
using UnitsNet.Units;

// Position
var position = new LengthVector2(
    Length.FromMeters(3),
    Length.FromMeters(4));

// Kinematics: displacement over time → velocity
SpeedVector2 velocity = position / Duration.FromSeconds(2);

// Dynamics: F = ma
var accel = new AccelerationVector2(
    Acceleration.FromMetersPerSecondSquared(9.8),
    Acceleration.FromMetersPerSecondSquared(0));
ForceVector2 force = accel * Mass.FromKilograms(5);

// Dot product: work = F · d  (yields Energy)
Energy work = force.Dot(position);

// Normalize to a unit DoubleVector2 direction
DoubleVector2 dir = position.Normalize();

// Scalar magnitude
Length mag = position.Magnitude();

Kinematic operator chains

Expression Returns
LengthVector2 / Duration SpeedVector2
SpeedVector2 / Duration AccelerationVector2
AccelerationVector2 / Duration JerkVector2
AccelerationVector2 * Mass ForceVector2
ForceVector2 * Duration ImpulseVector2
ForceVector2.Dot(LengthVector2) Energy
ForceVector2.Dot(SpeedVector2) Power
SpeedVector2.Dot(SpeedVector2) SpecificEnergy

The same chains exist for all Vector3 variants.

Type inventory

2D types

Type Component unit Notes
DoubleVector2 double Dimensionless direction / normalised result
LengthVector2 Length Position
SpeedVector2 Speed Velocity
AccelerationVector2 Acceleration Linear acceleration
ForceVector2 Force Newtonian force
JerkVector2 Jerk Rate of acceleration change
ImpulseVector2 Impulse Momentum impulse
MagneticFieldVector2 MagneticField
MagnetizationVector2 Magnetization
LinearDensityVector2 LinearDensity
ElectricFieldVector2 ElectricField

3D types

Type Component unit Notes
DoubleVector3 double Dimensionless
LengthVector3 Length
SpeedVector3 Speed
AccelerationVector3 Acceleration
ForceVector3 Force
JerkVector3 Jerk
ImpulseVector3 Impulse
MagneticFieldVector3 MagneticField
MagnetizationVector3 Magnetization
MassFluxVector3 MassFlux
ElectricFieldVector3 ElectricField
ElectricCurrentDensityVector3 ElectricCurrentDensity
TemperatureGradientVector3 TemperatureGradient

Common API (all types)

Member Description
X, Y (/ Z) Component accessors
Zero Static zero vector
Magnitude() Scalar Euclidean magnitude
Normalize() Returns a DoubleVector2/DoubleVector3 unit vector
Dot(other) Dot product; return type depends on the pair
As(unit) Returns (double X, double Y) in the specified unit
+, -, *, / Component-wise arithmetic
==, != Value equality (record struct)
ToString() Formatted component string

Source repository

https://code.thundersizzle.tech/Thunder/thunder-unitsnet-vectors

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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Thunder.UnitsNET.Vectors:

Package Downloads
Thunder.UnitsNET.Vectors.MonoGame

MonoGame/XNA integration for Thunder.UnitsNET.Vectors. Converts unit-aware LengthVector2/Vector3 to XNA Vector2/Vector3 with explicit scale, keeping physics and rendering units separate.

Thunder.UnitsNET.Vectors.Geometry.MonoGame

MonoGame/XNA integration for Thunder.UnitsNET.Vectors.Geometry. Converts unit-aware 2D geometry shapes to XNA rendering primitives with explicit scale, keeping physics and rendering units separate.

Thunder.UnitsNET.Vectors.Geometry

Unit-aware 2D geometry types built on Thunder.UnitsNET.Vectors. Shapes, directions, and spatial primitives for physics-driven game loops.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 0 4/14/2026
0.1.1 48 4/13/2026
0.1.0 53 4/13/2026