DeltaMaths 0.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package DeltaMaths --version 0.0.7
                    
NuGet\Install-Package DeltaMaths -Version 0.0.7
                    
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="DeltaMaths" Version="0.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DeltaMaths" Version="0.0.7" />
                    
Directory.Packages.props
<PackageReference Include="DeltaMaths" />
                    
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 DeltaMaths --version 0.0.7
                    
#r "nuget: DeltaMaths, 0.0.7"
                    
#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 DeltaMaths@0.0.7
                    
#: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=DeltaMaths&version=0.0.7
                    
Install as a Cake Addin
#tool nuget:?package=DeltaMaths&version=0.0.7
                    
Install as a Cake Tool

DeltaMaths

Portable engine-independent mathematics for .NET. Runtime targets netstandard2.0, netstandard2.1, net8.0 and net10.0, and has no Unity, renderer or System.Numerics dependency.

The API includes scalar utilities and deterministic 16.16 fix, bool/int/uint/float/double/half/fix vectors, geometry/interpolation/trigonometry, swizzles, generated GLSL-compatible float/double matrices and quaternion, plus normalized GLSL pack/unpack operations for float2 and float4 and bit-preserving double-word packing. It also provides conventional DeltaMaths.* and shader-like lowercase maths.* entry points.

fix stores a signed 16.16 value. Its public raw field is intentionally retained as a narrow ABI and serialization escape hatch for existing integrations; ordinary code should use the typed conversions and operators.

using Delta.Maths;
using static Delta.Maths.maths;

var direction = normalize(new float3(1f, 2f, 3f));
var transform = float4x4.CreateTRS(position, rotation, scale);

The generated matrix types cover every floatCxR and doubleCxR combination where C and R are 2, 3 or 4, matching GLSL's matCxR and dmatCxR names. C is the number of columns and R is the number of rows. Each matrix stores sequential column vectors (c0, c1, ...), so M * v uses column vectors and matches GLSL 4.60. In std430, a three-component float column has a 16-byte stride and a three-component double column has a 32-byte stride; the generated values contain explicit padding where required. The manifest records the column count, row count, alignment, stride and total size. Square matrices also provide determinant, inverse and a safe TryInverse; every matrix provides arithmetic, matrix/vector multiplication, transpose, matrixCompMult and outerProduct.

Each matrix has constructors from its column vectors, a diagonal scalar, all row-major Mij scalar components, and every other generated float or double matrix. The matrix-to-matrix constructor follows GLSL conversion rules: overlapping columns and rows are copied, missing off-diagonal elements are zero, and a missing diagonal element is one. The Mij scalar constructor retains the CLR row-major parameter order for compatibility; use the column constructor when spelling a GLSL column-major scalar sequence explicitly.

float4x4 is column-major as four sequential float4 columns. Translation is in c3.xyz; T * R * S applies scale, rotation, then translation. CPU code, GLSL and std430 share this convention.

src/DeltaMaths/Vectors/shader-contract.json is generated from the same declarations and is the committed generated DeltaMaths ABI consumed and validated by DeltaShader. DeltaMathsGen owns its declarations/generation; neither DeltaMaths nor DeltaShader recreates it. fix remains CPU-only. Float, double and half shader entries carry the std430, float64 or float16 capability required by their GLSL type; actual device/compiler support is decided by the shader consumer. GPU-only intrinsics stay in DeltaShader.

See CPU_GPU_CONFORMANCE.md for the cross-project CPU/Shader/Vulkan correctness protocol. Its bundles are test tooling, not part of the runtime DeltaMaths API.

See WORKFLOW.md for generation/build/test commands, TODO.md for selected work and AGENTS.md for routing.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 is compatible.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on DeltaMaths:

Package Downloads
DeltaText

Renderer-neutral text shaping and managed glyph image generation for .NET.

DeltaXAML.Contract

Neutral input and borrowed UI display-list contracts for DeltaXAML consumers.

DeltaXAML

Retained XAML UI library with typed properties, bindings and layout.

DeltaRender.Vulkan

Vulkan implementation of the DeltaRender RenderGraph contract.

DeltaRender

Renderer-neutral Vulkan RenderGraph contracts for DeltaRender.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.11 79 9/9/2026
0.0.10 173 9/3/2026
0.0.7 249 9/2/2026