NorthRoc.DivisionMath
0.2.1
dotnet add package NorthRoc.DivisionMath --version 0.2.1
NuGet\Install-Package NorthRoc.DivisionMath -Version 0.2.1
<PackageReference Include="NorthRoc.DivisionMath" Version="0.2.1" />
<PackageVersion Include="NorthRoc.DivisionMath" Version="0.2.1" />
<PackageReference Include="NorthRoc.DivisionMath" />
paket add NorthRoc.DivisionMath --version 0.2.1
#r "nuget: NorthRoc.DivisionMath, 0.2.1"
#:package NorthRoc.DivisionMath@0.2.1
#addin nuget:?package=NorthRoc.DivisionMath&version=0.2.1
#tool nuget:?package=NorthRoc.DivisionMath&version=0.2.1
DivisionMath
A cross-platform math library for CPU and GPU that uses the same code everywhere.
DivisionMath is part of the Division Engine ecosystem. It is built for a future library, DivisionTranslate. Together, these two libraries will replace ComputeSharp and enable cross-platform builds of Division Engine.
Unlike ComputeSharp, DivisionMath is designed for 1:1 parity math operations on the CPU and GPU with DivisionTranslate. Write your math once, run it on the CPU for tooling and gameplay, then run the same code on the GPU for compute workloads.
Why DivisionMath?
Math code often gets duplicated: one version for the CPU, another for the GPU. DivisionMath aims to remove that split. The API is designed to be familiar, portable, and dependency-free, so the same vector and matrix operations can move between CPU and GPU code with minimal friction.
Features
- Same API on CPU and GPU — write once, use everywhere.
- Full swizzling support —
.xyz,.rgb,.xy, and other familiar swizzles. - No external dependencies — lightweight and easy to drop into any project.
- Cross-platform — built for modern .NET.
- CPU/GPU parity — designed to pair with DivisionTranslate for consistent results.
- MIT licensed — free to use in open-source and commercial projects.
Installation
DivisionMath is available on NuGet: https://www.nuget.org/packages/NorthRoc.DivisionMath/
Install via the .NET CLI:
dotnet add package NorthRoc.DivisionMath
Or add it directly to your .csproj:
<PackageReference Include="NorthRoc.DivisionMath" Version="*" />
Project Status
DivisionMath is part of the larger Division Engine toolchain. It is under active development, with the goal of providing a consistent math layer for CPU tooling and GPU compute shaders. Keep an eye on DivisionTranslate for the runtime side of the CPU/GPU story.
Related Projects
- Division Engine
- DivisionTranslate
- ComputeSharp — inspiration for the C#-to-HLSL workflow.
License
DivisionMath is licensed under the MIT License. See LICENSE for details.
Sponsor
If DivisionMath is useful to you, consider supporting development:
| Product | Versions 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NorthRoc.DivisionMath:
| Package | Downloads |
|---|---|
|
NorthRoc.DivisionCompute
DivisionCompute is a source-to-source compiler and runtime that lets you write HLSL compute shaders directly in C# |
GitHub repositories
This package is not used by any popular GitHub repositories.
Added documentation and updated README