# Unity-Technologies/Unity.Mathematics

The C# math library used in Unity providing vector types and math functions with a shader like syntax

Repository: https://github.com/Unity-Technologies/Unity.Mathematics
Canonical: https://ross.abutalabs.com/products/unitymathematics
Language: C#
License: NOASSERTION
License Family: other
Last push: 2026-08-06T07:39:53+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 3247, "days_push": 27, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1442, forks 158 (observed 2026-08-28T04:04:44.430801+00:00)

## What it is
Unity.Mathematics is a C# math library providing vector types (float2, float3, float4, etc.) and math functions with an HLSL/GLSL-like syntax. It is used by Unity's Burst compiler to generate highly optimized SIMD native code across platforms.

## Use cases
- perform vector math in C# with shader-like syntax
- write SIMD-optimized math code compiled by Burst
- use float3/float4 vector types in Unity DOTS projects
- port HLSL/GLSL math logic to C#
- do dot products, normalization, and matrix math in games
- write high-performance graphics and simulation code in C#

## When to choose
- you are developing with Unity, especially DOTS or Burst
- you want a graphics/shader-style math API in C#
- you need SIMD-optimized vector math across platforms

## When to avoid
- you need a general-purpose .NET math library outside Unity
- you prefer System.Numerics object-oriented vector API
- you cannot tolerate breaking API changes, as the API is still evolving

## Facets
- artifact type: library
- maturity: active
- function: math
- domain: graphics, developer-tools
- platform: cross-platform, cpp
- tags: csharp, unity, simd, vector-types, shader-syntax, burst-compiler, game-engine, game-development

## Member repositories
- Unity-Technologies/Unity.Mathematics (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.430801+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:23.422647+00:00, confidence not recorded.
  - readme: https://github.com/Unity-Technologies/Unity.Mathematics (fetched 2026-08-28T04:04:44.430801+00:00, sha 45fd38814507)
- Data as of 2026-08-30T08:39:29.467469+00:00.
